in reply to How do I match a number range?
You can see why I say it's ugly. But it works. I think I could even come up with a range-to-regex converter, for people in such a sad predicament. ;)$num =~ m{ \A 5 (?: 2 (?: 7[89] | [89][0-9] ) | 3 (?: [0-8][0-9] | 9[01] ) ) \z }x;
Originally posted as a Categorized Answer.
|
|---|