How can I match all numbers greater than 36 to any bigger number?
I tried this expression:
[4-9]\d+|\d{3,}
Problem is this will select all number greater than 40 but I need 37, 38 and 39 as well, How can i achieve that?
NOTE: My query is different: I couldn't understand from there so I asked my own question and my query is 100% different. Being similar in some ways is another thing than being duplicate. Peace out.
Simply adding 3[7-9]
(to match 37, 38, 39) will work:
3[7-9]|[4-9]\d+|\d{3,}
UPDATE
To prevent matching numbers like 0001
:
3[7-9]|[4-9]\d+|[1-9]\d{2,}
The simplest solution:
37|38|39|[4-9]\d+|\d{3,}
or to exclude numbers starting with 0:
\b(37|38|39|[4-9]\d+|(?!0)\d{3,})\b
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