in reply to How do I match a number range?

Homework?

If not, please explain why "regular expression" is part of the requirement.

Originally posted as a Categorized Answer.