Re: re.findall() hangs in python

2007-04-01 Thread [EMAIL PROTECTED]
On Apr 1, 5:23 am, [EMAIL PROTECTED] wrote: > On Apr 1, 6:12 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > But when 'data' does not contain pattern, it just hangs at > > 're.findall' > > > pattern = re.compile("(.*) > re.S) > > That pattern is just really slow to evaluate. What you wan

Re: re.findall() hangs in python

2007-04-01 Thread irstas
On Apr 1, 6:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > But when 'data' does not contain pattern, it just hangs at > 're.findall' > > pattern = re.compile("(.*) re.S) That pattern is just really slow to evaluate. What you want is probably something more like this: re.compile(r']*src\s

Re: re.findall() hangs in python

2007-03-31 Thread Gabriel Genellina
En Sun, 01 Apr 2007 03:58:51 -0300, Peter Otten <[EMAIL PROTECTED]> escribió: > [EMAIL PROTECTED] wrote: > >> I have the following regular expression. >> It works when 'data' contains the pattern and I see 'match2' get print >> out. >> But when 'data' does not contain pattern, it just hangs at >

Re: re.findall() hangs in python

2007-03-31 Thread 7stud
On Mar 31, 9:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I have the following regular expression. > It works when 'data' contains the pattern and I see 'match2' get print > out. > But when 'data' does not contain pattern, it just hangs at > 're.findall' > > pattern = re.compile(

Re: re.findall() hangs in python

2007-03-31 Thread Peter Otten
[EMAIL PROTECTED] wrote: > I have the following regular expression. > It works when 'data' contains the pattern and I see 'match2' get print > out. > But when 'data' does not contain pattern, it just hangs at > 're.findall' > > pattern = re.compile("(.*) re.S) > > print "before find all"