-5

Can somebody give me the regex for validating the phone numbers 000.0000.000000 and also without the dots.

sample numbers 880.1817.087511 and 8801817087511

nimalex
  • 13
  • 3
  • 1
    [What have you tried?](http://mattgemmell.com/what-have-you-tried/) Please show us a sample of your code, and your attempts to solve this problem. – Cerbrus May 12 '14 at 10:59
  • 3
    Welcome to Stack Overflow! It looks like you want us to write some code for you. While many users are willing to produce code for a coder in distress, they usually only help when the poster has already tried to solve the problem on their own. A good way to demonstrate this effort is to include the code you've written so far, example input (if there is any), the expected output, and the output you actually get (console output, stack traces, compiler errors - whatever is applicable). The more detail you provide, the more answers you are likely to receive. Check the [FAQ] and [ask] – thefourtheye May 12 '14 at 11:00

1 Answers1

0

try this.

\b\d{3}[.]?\d{4}[.]?\d{6}\b
Md Nazmoon Noor
  • 3,187
  • 1
  • 24
  • 30