in reply to Redundant regex ([0-9]{2} | [0-9] {2, 4})?
No, /[0-9]{2} / does not match a subset of what / [0-9] {2, 4}/ matches.
/[0-9]{2} / only matches "99\x{20}", where 9 can by any digit 0-9
/ [0-9] {2, 4}/ only matches "\x{20}9\x{20}{2,\x{20}4}", where 9 can by any digit 0-9
Update: Fixed copy and paste bug in in second item.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Redundant regex ([0-9]{2} | [0-9] {2, 4})?
by Popcorn Dave (Abbot) on Feb 27, 2009 at 00:34 UTC | |
by ikegami (Patriarch) on Feb 27, 2009 at 01:35 UTC |
In Section
Seekers of Perl Wisdom