in reply to Re: Perl regex limitations (32k)
in thread Perl regex limitations
Warnings enabled, the 32k problem should have manifested itself:
Complex regular subexpression recursion limit (32766) exceededTo work around this problem (a warning remains), one may double the repeat quantifiers, e.g.:
my $braces = qr/(?<braces> { (?: (?: [^{}] | (?&braces) )*+ )* } )/x;
perlre has the following example on handling nested parens:
my $parens = qr/(\((?:[^()]++|(?-1))*+\))/; if (/foo $parens \s+ \+ \s+ bar $parens/x) { # do something here... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl regex limitations (32k)
by jonneve (Initiate) on Aug 06, 2014 at 13:20 UTC | |
|
Re^3: Perl regex limitations (32k)
by jonneve (Initiate) on Aug 06, 2014 at 14:03 UTC | |
by Anonymous Monk on Aug 06, 2014 at 16:08 UTC |