in reply to Re^2: RegExp Pattern Matching Behavior
in thread RegExp Pattern Matching Behavior
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: RegExp Pattern Matching Behavior
by perlpal (Scribe) on Jun 25, 2009 at 14:50 UTC |