I am trying to modify this Regex so that you get numbers greater or equals 1 or less than or equals to 10. This Regex allows >= 0 or <= 10.
I have a text field on a form that takes numbers equals or greater than 0 and less than 11. I could use IF’s and logical operators, TryParse but I kinda like the Regex.
@"^\d$|^[1][0]$"
You need to modify your regex only a little bit
You don’t need the square brackets around single characters and I would use a group around the alternation and change it to
See it here on Regexr