title: Regex Phone number with dashes
body: <p>I'm trying to get a regex that will validate the following formats:</p>
  
  <pre><code>234-567-8901
  1-234-567-8901
  </code></pre>
  
  <p>I have tried various examples, but not sure how to get the one that will take into account the possible 1- at the begging and still inforce the 234-567-8901.</p>
  
  <p>Rules are, any digit, 2 or 3 dashes, if 3 dashes then 11 numberes, if 2 dashes then 10 numbers.</p>
  
  <pre><code>^[0-9-]*$
  ^[\d-]+$
  ^[\d-]+$
  </code></pre>