In article <op.w5mwa3iaa8ncjz at gnudebeest>, "Rhodri James" <rhodri at wildebst.demon.co.uk> wrote: > I really, really wouldn't do this with a single regexp. You'll get a much > easier to understand program if you implement a small state machine > instead. And what is a regex if not a small state machine?