Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numeric range with regular expression

Tags:

regex

range

I need a regular 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?

like image 387
Katie Avatar asked Jan 19 '23 17:01

Katie


2 Answers

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

like image 126
krookedking Avatar answered Jan 22 '23 07:01

krookedking


Here you go...

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

like image 21
Crayon Violent Avatar answered Jan 22 '23 07:01

Crayon Violent