Regular expression number range

I need a regex to find a number in the range [40010-40100]. I tried with this 40[0-1][0-9][0-9] , but it does not work. Can someone help me?

+4
source share
4 answers

Here you go ...

40(0([1-9][0-9])|100)

+2
source

This should do: (40100|400[1-9][0-9])

+5
source

Try to execute

 40((0[1-9][0-9])|(100)) 

Although this is not a big task for regular expression. It would be much easier to simply compare the range by number

+1
source

/400[1-9][0-9]|40100/

Why can't I just send an answer without β€œOh!”?

+1
source

All Articles