Re: regular expression extracting groups

2008-08-10 Thread clawsicus
Thanks all for your responses, especially Paul McGuire for the excellent example usage of pyparsing. I'm off to check out pyparsing. Thanks, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression extracting groups

2008-08-10 Thread Paul McGuire
On Aug 10, 7:56 am, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Aug 10, 2:30 pm, [EMAIL PROTECTED] 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 lim

RE: regular expression extracting groups

2008-08-10 Thread Edwin . Madari
if its *NOT* an exercise in re, and if input is a bunch of lines within '{' and '}' and each line is key="value" pairs, I would not go near re. instead simply parse keys and array of values into a dictionary, and process them from the dictionary as below, and the key option correctly has 2 entr

Re: regular expression extracting groups

2008-08-10 Thread Paul Hankin
On Aug 10, 2:30 pm, [EMAIL PROTECTED] 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