Regular Expression

Posted on 2011-03-19
Last Modified: 2012-05-11
I do not have expirience about Reg's and i need some help
this Regular :

Open in new window

gives me a result like (800) 325-3535 or (210) 556 3535
i need a regular expression like +30 (210) 5563535
First part is an international code (max 9 digit plus + at the begging)
second part is area Code max 6 digit within parenthesis
third part is the actual tel number max 10 digits
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
  • 4
  • 2

Expert Comment

ID: 35171495
This should match your current examples, as well as with the international extension added. In other words the international code is defined as optional here.


Open in new window

If you don't want the international code to be optional, and only match numbers with the international code, then try this:


Open in new window


Accepted Solution

crysallus earned 250 total points
ID: 35171512
oops. Forgot about the other changes you mentioned in points 2 and 3. Try this, for optional international code:


Open in new window

Not optional:


Open in new window

LVL 18

Author Comment

by:John (Yiannis) Toutountzoglou
ID: 35171521
You got it in your second post ...
thank you very much ....
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 18

Author Comment

by:John (Yiannis) Toutountzoglou
ID: 35171598
i try to inert a specified Set of [0-9] to accept only numbers and it Match also if with letter...
"Your Syntax is correct.." ..i try this

Open in new window

What am i missing?
LVL 18

Author Comment

by:John (Yiannis) Toutountzoglou
ID: 35171832
For example if i set +30 (210) 5564fffff then it return true....
LVL 18

Author Comment

by:John (Yiannis) Toutountzoglou
ID: 35171836
My expression is

Open in new window


Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with opening combobox using VB.NET. 3 38
How to identify a paragraph in the body of text? 2 56 Is there code behind PowerPivot 2 52
"lblTime is not declared" 3 36
Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…

730 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