in reply to How do I match a number range?

Regular expressions aren't the best tool for finding numbers within a range. However, your range can be broken down into subranges for which regular expressions can be constructed and those can then be combined into a single regular expression:
5278..5391 5278..5279,5280..5299,5300..5389,5390..5391 /(^|\D)5(2(7[89]|[89]\d)|3([0-8]\d|9[01]))(\D|$)/
not very pretty and not necessarilly very fast, but it should work.

tye

Originally posted as a Categorized Answer.