Hi,

I am trying to use the following snippet of code to print a regex match.

s = '01234567890123456789x012'

pat = r'(.*?x|[^a]+)*y'

mo = re.search(pat, s)
if mo is not None:
    print mo.group(0)

By adding one character before the 'x' in the input string, the time taken
to print the match doubles. This behaviour is not observed in perl. I am
curious to know about the difference the in regex implementations of perl
and python which causes this.

Thanks
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to