As I stated above, the expression (?:[3-9]|[1-2]\d|30) will match the numbers 3 through 30 inclusive. I used a non-capturing group to isolate the ors from the surrounding expressions and include three terms: [3-9] matches single digits 3-9; [1-2]\d matches single digits 1 or 2 followed by any digit, meaning 10-29; 30 matches 30.
In reply to Re^3: RegExp Pattern Matching Behavior
by kennethk
in thread RegExp Pattern Matching Behavior
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |