Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Regular Expression- Range (telephone)

Posted on 2016-10-19
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 regexr.com and I'm only getting one match though.
LVL 35

Accepted Solution

Terry Woods earned 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Whatever be the reason, if you are working on web development side,  you will need day-today validation codes like email validation, date validation , IP address validation, phone validation on any of the edit page or say at the time of registration…
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…
Suggested Courses

604 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