chakram88 has asked for the wisdom of the Perl Monks concerning the following question:
Oh Enlighted Ones:
I have dutifully super-searched to no avail, and I humbly ask your guidance.
I'm not sure if this is an undocumented feature, or if there is a purpose for it. (or perhaps documented where I have been unable to locate it).
Apparently there is an upper limit of '32766' on the MAX value of the regex {MIN,MAX} quantifier. I discovered this by way of the Data::FormValidator max_length constraint.
Observe:
#!/usr/bin/perl -lw my $max = 32767; my $value = "feeefooobarrr"; my $match = ($value =~ /^(.{0,$max})$/); print $match;
produces the following error:
Has anyone come across this upper limit before? Am I missing documentation surrounding this? Is it too obscure to worry about?Quantifier in {,} bigger than 32766 in regex; marked by <-- HERE in m/^(.{ <-- HERE 0,32767})$/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Size Limit on {MIN,MAX} Regex Quantifier?
by FunkyMonk (Bishop) on Nov 05, 2007 at 19:55 UTC | |
by chakram88 (Pilgrim) on Nov 05, 2007 at 20:12 UTC | |
|
Re: Size Limit on {MIN,MAX} Regex Quantifier?
by grinder (Bishop) on Nov 05, 2007 at 21:28 UTC |