in reply to Size Limit on {MIN,MAX} Regex Quantifier?

Is your regexp exceptionally intricate and detailed, and your code is a cut-down example, or are you really just trying to match anything (dot).

If it's the latter case, then a regexp is not the right way to go about solving the problem. Better to:

my $len = length $value; if ($len < $min or $len > $max) { panic(); } else { ok(); }

Internally, perl keeps track of string length at all times, so calling length is a very cheap operation, whereas it is quite possible that the regexp engine has to scan through the whole string to satisfy the curly.

• another intruder with the mooring in the heart of the Perl