title: Regex US phone number validation
body: <p>I found this javascript regex to validate the different format the US phone numbers can be written. But it has problem: it fails to match the second rule in this group:</p>
  
  <blockquote>
    <p>The first group of three digits, know as area code start with a number
    2–9, followed by 0–8, and then any third digit.</p>
  </blockquote>
  
  <p>It accepts 9 whereas it should only accept numbers from (0-8). This regex show it all: <a href="http://regexr.com/3ackc" rel="nofollow">http://regexr.com/3ackc</a></p>
  
  <pre><code>/^(1[- .]?)?(\([2-9]\d{2}\)[. -]?|[2-9]\d{2}[. -]?)[2-9]\d{2}[- .]?\d{4}$/gm
  </code></pre>