catastrophic regexp, help!

Maric Michaud maric at
Wed Jun 11 09:19:26 CEST 2008

Le Wednesday 11 June 2008 09:08:53 Maric Michaud, vous avez écrit :
> "this is zlatan example.'
> compare with 'this is zlatan example', 'z'=='.', false
> compare with 'this is zlatan ', 'z'=='e', false
> compare with 'this is zlatan', 'z'==' ', false
> compare with 'this is ', "zlatan"=="zlatan", true

Ah no ! it stops here, but would have continued on the entire string upto the 
empty string if it doesn't contain zlatan at all.

> compare with 'this is', 'z'==' ', false
> compare with 'this ', 'z'=='i', false
> compare with 'this', 'z'==' ', false


Maric Michaud

More information about the Python-list mailing list