Regexp new with numbers

Adding on to the `if/elsif` chain feels dirty. Suggestions, or leave as is?