I want to match a number between 2-16, spanning 1 digit to 2 digits.
Regular-Expressions.info has examples for 1 or 2 digit ranges, but not something that spans both:
The regex
[0-9]matches single-digit numbers 0 to 9.[1-9][0-9]matches double-digit numbers 10 to 99.
Something like ^[2-9][1-6]$ matches 21 or even 96! Any help would be appreciated.
will match either a single digit between 2 and 9 inclusive, or a 1 followed by a digit between 0 and 6, inclusive.