title: Exclude a group regular expression
body: <p>I search in many threads in Stackoverflow but I didn't find anything relevant for my case.</p>
  
  <p>Here is the source text :</p>
  
  <pre><code>&lt;span class="red"&gt;&lt;span&gt;70&lt;/span&gt;&lt;span style="display:none"&gt;1&lt;/span&gt;&lt;span&gt;,89&lt;/span&gt; € TTC&lt;br /&gt;&lt;/span&gt;
  </code></pre>
  
  <p>I want to extract 70,89 with a regular expression.</p>
  
  <p>So I tried :</p>
  
  <pre><code>&lt;span class="red"&gt;&lt;span&gt;([0-9]+)(&lt;\/span&gt;&lt;span style="display:none"&gt;1&lt;\/span&gt;&lt;span&gt;)(,[0-9]+)&lt;\/span&gt;
  </code></pre>
  
  <p>which returns an array (with preg_match_all in PHP) with 3 groups :</p>
  
  <p>1/ 70</p>
  
  <p>2/    </p>
  
  <pre><code>&lt;/span&gt;&lt;span style="display:none"&gt;1&lt;/span&gt;&lt;span&gt;
  </code></pre>
  
  <p>3/ ,89</p>
  
  <p>I would like to exclude group 2 and merge 1 &amp; 3.</p>
  
  <p>So I also tried :</p>
  
  <pre><code>&lt;span class="red"&gt;&lt;span&gt;([0-9]+)(?:&lt;\/span&gt;&lt;span style="display:none"&gt;1&lt;\/span&gt;&lt;span&gt;)(,[0-9]+)&lt;\/span&gt;
  </code></pre>
  
  <p>but it returns :</p>
  
  <ol>
  <li>70</li>
  <li>,89</li>
  </ol>
  
  <p>How can I merge the two groups ?</p>
  
  <p>Thanks a lot for your answers, I am going to be crazy searching for this regular expression ! :)</p>
  
  <p>Have a good day !</p>