regular expression extracting groups

Paul Hankin paul.hankin at
Sun Aug 10 14:56:30 CEST 2008

On Aug 10, 2:30 pm, clawsi... at 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.

Paul Hankin

More information about the Python-list mailing list