I've tried several options without success.
(105)|(0*\d{1,2})
This is where I go?
I like the answer above /10[0-5]|[0-9]{1,2}/ but it is not anchored so it will match things like 990 and 1051. It will match as a regexp I mean.
To anchor the regexp use ^ at the start and $ at the end. Here's an improved version of the answer
/^(10[0-5]|\d{1,2})$/
I've used \d which is a commonly available shortcut for [0-9] digits
Edit: see tripleee's comment below, also needs ( ) to group the two alternate expressions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With