in reply to Regex: Lookahead

Usually you'd want a parser, but a tokenizer will do the trick here.

It's much more robust then using regexp patterns, and it's very clear and simple.