title: JavaScript Regular Expressions for Phone Validation
body: <p>I need help with a line of regular expression which validates phone number and it goes like this:
  <code>tel:/^(?:(?:\+?1\s*(?:[\.\-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[\.\-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[\.\-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/</code></p>
  
  <p>And these are the formats it validates:</p>
  
  <blockquote>
    <p><em>555 5555</em><br>
    <em>1-555-555-5555</em><br>
    <em>1.555.555.5555</em><br>
    <em>15555555555 extension 555</em><br>
    <em>15555555555 ext. 555</em><br>
    <em>15555555555 # 555</em><br>
    <em>15555555555 x. 555</em>  </p>
  </blockquote>
  
  <p>I want to validate numbers like:</p>
  
  <blockquote>
    <p>+263 772 485 384<br>
    773456284<br>
    0773456284  </p>
  </blockquote>
  
  <p>mostly international numbers</p>