Roy Smith <r...@panix.com> writes: > In article <op.w5mwa3iaa8ncjz@gnudebeest>, > "Rhodri James" <rho...@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?
Regex is not a state machine implemented by the original poster :-) Or, in other words, I interpret Rhodri as saying that the right way to do this is by implementing a *different* small state machine, which will address the task better than the small state machine of regex. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but three round meals a day wouldn't be as hard to | _o__) swallow.” —_Pinky and The Brain_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list