Your issue is that you expect [3-30] to match numbers 3-30, when you are performing what come down to complex string comparisons. The result of that particular group would be matching the character 3 (actually the range 3-3) or the character 0. If you substituted /d{1,2}, you would match any 1 or 2 digit sequence. If you really mean 3-30, you could use the more complex (?:[3-9]|[1-2]\d|30). See perlreftut for more instruction on using regular expressions.
In reply to Re: RegExp Pattern Matching Behavior
by kennethk
in thread RegExp Pattern Matching Behavior
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |