Dear Gerhard, on your example maybe it's worth using regular expression, you could match those four pattern at once, sorry I have no code handy right now, Karl