title: Python regex for matching phone numbers
body: <p>I am newbie to Python regex , I need your help.
  I'm using the following regex to match phone numbers:</p>
  
  <pre><code>r'^\s*\(?([0-9]{3})[\)\-][\s]*?([0-9]{3})[-]?([0-9]{4})\s*$'
  </code></pre>
  
  <p>Apprantly it does pass most of cases but it does not fail some of the formats.
  Could someone clarify what I am doing wrong?
  I guess there is something wrong with space and parenthesis format in the first part of number.</p>
  
  <p>It should <strong>pass</strong> these formats </p>
  
  <pre><code>'(404) 666-1111'
  '(404) 6661111'
  '404-666-1111'
  '404-6661111'
  '404666-1111'
  '4046661111'
  '  (404)   666-1111  '
  '(404)666-1111  '
  '  404-666-1111 '
  '  404-6661111 '
  ' 4046661111'
  </code></pre>
  
  <p>        
  and <strong>fail</strong> at these:</p>
  
  <pre><code>'+1 (404) 666-1111'
  ' ( 404)666-1111'
  '404.666.1111'
  '404 666-1111'
  '404 666 1111'
  '(404-666-1111'
  </code></pre>