in reply to Is there a hard limit on + in a regex?
You said that the real regex is more complex. Does it include an explicit quantifier?
+ seems happy to match 160,000 repetitions on either 5.6.1 or 5.8.4, but it doesn't like explicit quantifier greater than 32766.
P:\test>perl5.6.1 -Mstrict -wle "my $s= '<object>' x 160_000; print 'Ok' if $s =~ m[^(?:<object>)+$]" Ok P:\test>perl5.8.4 -Mstrict -wle "my $s= '<object>' x 160_000; print 'Ok' if $s =~ m[^(?:<object>)+$]" Ok P:\test>perl5.8.4 -Mstrict -wle "my $s= '<object>' x 160_000; print 'Ok' if $s =~ m[^(?:<object>){1600 +00}$]" Quantifier in {,} bigger than 32766 in regex; marked by <-- HERE in m/^(?:<object>){ <-- HERE 160000}$/ at -e line 1 +.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there a hard limit on + in a regex?
by diotalevi (Canon) on Jul 09, 2004 at 19:46 UTC | |
by BrowserUk (Patriarch) on Jul 09, 2004 at 20:12 UTC | |
|
Re^2: Is there a hard limit on + in a regex?
by samtregar (Abbot) on Jul 09, 2004 at 19:59 UTC |