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.findall' >> >> pattern = re.compile("(.*)<img (.*?) src=\"(.*?)img(.*?)\"(.*?)", >> re.S) > > Could it be that it is just slow? If not, post a small example of data > that > provokes findall() to hang. I bet it is very slooooooow! To the OP: do you actually need all those groups? Specially the first and last (.*), they match all the surrounding text. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list