title: PHP: Validate string containing numbers, separated by hyphen (possible by preg_match)?
body: <p>I’m trying to validate a string which contains numbers where each four numbers are separated by a hyphen, for example 1111-2222-3333-4444</p>
  
  <p>I’m trying to do some kind of validating so I can guarantee that this format is being used (with 16 digits, three hyphens and nothing else). I’ve this preg_match where it checks for digits only but I need to accept hyphens and this format.</p>
  
  <pre><code>preg_match('/^[0-9]{1,}$/', $validatenumbers)
  </code></pre>
  
  <p>I’ve tried to do it with regex but unfortunately it isn’t my strongest side so I haven’t been able to correctly validate the numbers. </p>
  
  <p>It is important that it is in PHP and not Javascript because of the ability to “turn off” javascript in a browser. </p>