Numeric range with regular expression
I need a regul开发者_开发百科ar expression to find a number in the range [40010-40100]. I tried with this 40[0-1][0-9][0-9]
but it doesn't work. Could someone help me?
This should do : (40100|400[1-9][0-9])
Here you go...
40(0([1-9][0-9])|100)
Try the following
40((0[1-9][0-9])|(100))
Although this is not a great task for a regular expression. It would be much easier to simply do a range comparison on the number
/400[1-9][0-9]|40100/
Why oh why can't I just post the answer without an "Oops!"?
精彩评论