title: matching phone number in regular expression
body: <pre><code>[1-9]\\d{2}-[1-9]\\d{2}-\\d{4}
  </code></pre>
  
  <p>What does the [1-9] do? is that like a specific range of integer?
  I tried 194-333-1111 but doesn't validate.</p>
  
  <p>This is a trivial questions but took me an hour and still can't figure out.</p>
  
  <p>Any help is appreciated!!! Thanks</p>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <pre><code>if (phone.matches("[1-9]\\d{2}-[1-9]\\d{2}-\\d{4}"))
    System.out.println("Invalid phone number");
  else
    System.out.println("Valid input. Thank you.");
  </code></pre>