(?:[1-31]) #day, 1 to 31
That's not doing what you think it is. What you have there is functionally equivalent to [123] (or [1-3]).
A simple replacement would be \d+ (or, perhaps, \d\d?). But that also matches many invalid dates.
Update: Fletch fills in details that I was too lazy to :-)
See the Copyright notice on my home node.
"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg
In reply to Re: Regex question
by davorg
in thread Regex question
by coltman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |