$re = '/(\d+)(?:[\/-](\d+)|b)/m';
$str = '
Manufacturer XY-2822, 10-mill, 17-25b
Other Manufacturer 16b Part
Another Manufacturer WER M9000, 11-mill, 11-40
18b Part
Maker 11-36, 10-mill
Maker 1x or 2x; Max sizes 1x (34b), 2x (38/24b)
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php