title: Regex to match N-NN-NN
body: <p>I need some help with a RegEx pattern match.</p>
  
  <p>How do i write a regex if i want it to match </p>
  
  <pre><code>N-NN-N-NN-NN-N-NNN
  </code></pre>
  
  <p>but also</p>
  
  <pre><code>N-NN-NN-NN
  </code></pre>
  
  <p>Exmaple:</p>
  
  <blockquote>
    <p>10pcs- ratchet spanner combination wrench <strong>6-8-10-11-12-13-14-15-17-19</strong> 
    Cr-v,heated  12pcs-1/4dr <strong>4-4.5-5-5.5-6-7-8-9-10-11-12-13</strong>  Cr-v,heated 
    17pcs-1/2dr <strong>10-11-12-13-14-15-16-17-18-19-20-21-22-23-24-27-30</strong> 
    Cr-v,heated <strong>1-2-33</strong> Cr-V heater <strong>1-.2-1-4</strong></p>
  </blockquote>
  
  <p>It needs to match where they is at least 2 <code>-</code> in the total string. So a phone number like this 020-11223344 is <strong>not</strong> to be matched.</p>
  
  <p>The strings almost always look like this <code>6-8-10-11-12-13-14-15-17-19</code> , except sometimes a <code>.</code> can apper before a number, they also differ in length, is it possible? </p>
  
  <p>I came up with this so far but it also matches on phone numbers and when a <code>.</code> appears it doenst match at all.</p>
  
  <pre><code>(\d-[^&gt;])
  </code></pre>
  
  <p>On this page you can find the different patters: <a href="http://www.cazoom.nl/en/partij-aanbod/186-pcs-working-tools-trolly-3" rel="nofollow">http://www.cazoom.nl/en/partij-aanbod/186-pcs-working-tools-trolly-3</a></p>