Link to home
Start Free TrialLog in
Avatar of ezzadin
ezzadin

asked on

Regular Expression- Range (telephone)

Hi,

I need a regular expression code that identifies number between 8003966101 and 8003966150. Can someone help me with this?

Thanks.
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Pattern:
/80039661(0[1-9]|[1-4]\d|50)/

Open in new window


Depending on the language, the \ character may need escaping, and the pattern delimiters / may or may not need to be there.
Avatar of ezzadin
ezzadin

ASKER

Hi Terry,

Thanks. I tested the Regex using regexr.com and I'm only getting one match though.
ASKER CERTIFIED SOLUTION
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ezzadin

ASKER

I see. This is working great. Thanks.