Skip to Content

Back with RegEx

I am using PHP pages along with SAP . In that i need to validate the phone numbers entered.

Following is the RegEx for this

 d{3}-d{4}

But this scenario is failing if phone numbers are entered this way

399-3899877

ie sometimes i am getting the data in SAP in the above said manner

this scenario my RegEx is failing.

Any info related to this greatly appreciated.

a®s

Edited by: a®s on Jul 22, 2008 11:15 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 22, 2008 at 04:25 PM

    Solved

    Here is the info. may be for others it will be useful

    I need to create another RegEx for validating phone numbers like 399-3899877

    Here is the RegEx

     d{3}d{4}
    

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.