title: PHP preg_match - what's wrong with this RegEx?
body: <p>The values will be in this format 123-123-123-12345 that I would like the preg_match to work for. Can you see anything wrong with this regEx?</p>
  
  <pre><code>foreach($elem as $key=&gt;$value) {
  
     // Have tried this With and without the + before the $ as well
     if(preg_match("/^[0-9]{3}\-[0-9]{3}\-[0-9]{3}\-[0-9]{5}+$/", $value)) {
        echo "Yeah match Elm: ".$value."&lt;br /&gt;"; 
     } else {
        echo "Boo Hoo Elm: '".$value."'&lt;br /&gt;";  
     }
  }
  </code></pre>
  
  <p>have also tried</p>
  
  <pre><code>/^\d{3}\-\d{3}\-\d{3}\-\d{5}+$/
  
              //With and without the + before the $
  </code></pre>
  
  <p>They all fail with Boo Hoo ;(</p>
  
  <p>EDIT:</p>
  
  <pre><code>var_dump($elem)
  
  array(3) { [0]=&gt;  string(1) "c" [1]=&gt;  string(0) "" [2]=&gt;  string(36) "123-123-123-12345" }
  </code></pre>