$str = '<div class="product-desc col-md-6">
<h1 class="product-title" id="productTitle" itemprop="name">Электродная система MCScap-NS5-2515</h1>
<p>NS233522 L (54-60 cм)<span class="redactor-invisible-space"></span>
</p>
<p>NS233522<span class="redactor-invisible-space"> L/M (51-57 см)</span><br>
</p>
<p>NS233522<span class="redactor-invisible-space"> M (48-54 sm)<span class="redactor-invisible-space"></span><br></span>
</p>
<p><span class="redactor-invisible-space">NS233522 M/S (45-51 см)<span class="redactor-invisible-space"><br></span></span>
</p>
<p><span class="redactor-invisible-space"><span class="redactor-invisible-space">NS233522<span class="redactor-invisible-space"> S (42-48 см)<span class="redactor-invisible-space"></span><br></span></span></span>
</p>
<p><span class="redactor-invisible-space"><span class="redactor-invisible-space"><span class="redactor-invisible-space">NS233522 XL (60-66 см)<span class="redactor-invisible-space"><br></span></span></span></span>
</p>
<p><span class="redactor-invisible-space"><span class="redactor-invisible-space"><span class="redactor-invisible-space"><span class="redactor-invisible-space">NS233522 XL/L (57-63 см)<span class="redactor-invisible-space"><br></span></span></span></span></span>
</p>
</div>';
preg_match_all('#NS(.*?). .#is', $str, $arr3);
print_r($arr3[1]);
на выходе должно быть
Array (
[0] => NS233522
[1] => NS233522
[2]=>NS233522
[3] =>NS233522
[4]=>NS23352
[5] =>NS23352 )
таких
NS5-2515
быть не должно
Помогите решить задачу.