[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("(.*)<img (.*?) src=\"(.*?)img(.*?)\"(.*?)",
> re.S)
>
> print "before find all"
>
> match = re.findall(pattern, data)
>
> if (match):
> print "match2"
>
>
>
> Can you please tell me why it that?
Could it be that it is just slow? If not, post a small example of data that
provokes findall() to hang.
Peter
--
http://mail.python.org/mailman/listinfo/python-list