in reply to How do I match a number range?
But that may not meet your requirements. So, you can certainly construct a regex which only matches numbers in that range:if (/(\d{4})/ and $1 >= 5278 and $1 <= 5391) { # do something }
All you need is alternation, and (?:) for precedence./5(?:2(?:7[89]|[89][0-9])|3(?:[0-8][0-9]|9[01]))/
Originally posted as a Categorized Answer.
|
|---|