'Regex for any number above 20
im using: Dim Regex As Regex = New Regex("([A-z]{2})([2-9]{1})([1-9]{1})")
numbers such as 30 or 40 won't match, and if I change it to 0, then 20 will be accepted, which I don't want
Solution 1:[1]
New Regex("^(([2-9]|(1[0-9]))[0-9]+)$")
Solution 2:[2]
you can use this regex to select all above 20(21,22,.......):
/[2][1-9]/g
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MoRe |
| Solution 2 | Tomak |
