$re = '/[0-9]+[ ]*lbs?[ ]*[0-9]+[ ]*ozs?/';
$str = '6lb14ozs
6 lb 14ozs
8lb
8lbs
16lbs
6 lb 14ozs
6 lb 14 ozs
6 lbs 14ozs
6 lb 14ozs
69 lb 14ozs
6lb 14 ozs
6lb14 ozs
6 lb14 ozs
66lb14ozs
66 lb14ozs
65 lb 14ozs
66lb1ozs
66 lb1ozs
65 lb 1ozs
6lb14oz
6 lb14oz
6 lb 14oz
6 lb 14 oz
6lb 14 oz
6lb14 oz
6 lb14 oz
100lb 13ozs';
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