regular expression extracting groups

Paul Hankin paul.hankin at gmail.com
Sun Aug 10 08:56:30 EDT 2008


On Aug 10, 2:30 pm, clawsi... at gmail.com wrote:
> I'm trying to use regular expressions to help me quickly extract the
> contents of messages that my application will receive.

Don't use regexps for parsing complex data; they're limited,
completely unreadable, and hugely difficult to debug. Your code is
well written, and you've already reached the limits of the power of
regexps, and it's difficult to read.

Have a look at pyparsing for a simple solution to your problem.
http://pyparsing.wikispaces.com/

--
Paul Hankin



More information about the Python-list mailing list