Regular Expression- Range (telephone)

Posted on 2016-10-19
Last Modified: 2016-10-19

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

Question by:ezzadin
  • 2
  • 2
LVL 35

Expert Comment

by:Terry Woods
ID: 41851132

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.

Author Comment

ID: 41851185
Hi Terry,

Thanks. I tested the Regex using and I'm only getting one match though.
LVL 35

Accepted Solution

Terry Woods earned 500 total points
ID: 41851308
Can you save your test data there and provide a link? The "g" pattern modifier would normally cause multiple occurrences to be matched, ie

Open in new window

but it looks like the tool at your given link may use that pattern modifier by default. It seems to work for me:

Author Comment

ID: 41851311
I see. This is working great. Thanks.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Regular expression is a language that we use to edit a string or retrieve sub-strings that meets specific rules from a text. A regular expression can be applied to a set of string variables. There are many RegEx engines for u…
As most anyone who uses or has come across them can attest to, regular expressions (regex) are a complicated bit of magic. Packed so succinctly within their cryptic syntax lies a great deal of power. It's not the "take over the world" kind of power,…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question