Re: Short circuting

2011-01-24 Thread Mauro Caceres
Another option could be something like this: You can add ids to your regexp, so you can retrive them latter using groupdict. Once you have the ids in place, you can join in a new regexp with the "|" operator which is not greedy, it will stop after the first match. pattern = (?Pre_section)|?Pre_se

Re: Short circuting

2011-01-21 Thread Robert Kern
On 1/21/11 5:33 PM, Ed Connell wrote: Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.sea

Re: Short circuting

2011-01-21 Thread Tim Chase
On 01/21/2011 05:33 PM, Ed Connell wrote: Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.sear

Re: Short circuting

2011-01-21 Thread Alexander Kapps
On 22.01.2011 01:10, Alexander Kapps wrote: On 22.01.2011 00:33, Ed Connell wrote: Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.search(line); result4 = re_dat

Re: Short circuting

2011-01-21 Thread Alexander Kapps
On 22.01.2011 00:33, Ed Connell wrote: Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.se

Short circuting

2011-01-21 Thread Ed Connell
Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.search(line); result4 =