Wanted: slow regexes

Alexander Gattin xrgtn at yandex.ru
Sun Dec 12 15:04:22 EST 2010


Hello,

On Wed, Dec 08, 2010 at 04:24:02PM +0000, MRAB wrote:
> Interestingly, that webpage says that:
>
>     ("a" x 100000) =~ /^(ab?)*$/
>
> caused Perl to segfault. I tried it and it didn't segfault, but it
> didn't match either

It doesn't segfault but produces a warning with
-w:

xrgtn at xrgtn-q40:~$ perl -wse 'print(("a" x 100000) =~ /^(ab?)*$/)'
Complex regular subexpression recursion limit (32766) exceeded at -e line 1.
xrgtn at xrgtn-q40:~$ 

-- 
With best regards,
xrgtn



More information about the Python-list mailing list