$re = '/.*(?:\d(?:\.\d+)?\s*x\s*)?\K(?<!\d)\d+(?:\.\d+)?(?:k?g|m?l)\b|(?<!\d)\d+(?:\.\d+)?(?:k?g|m?l)(?=\s*x\s*\d)/i';
$str = 'product brand A 1237ml Bundle of 6
product milk choc370ML
brand milk Vanilla Flavor 850g
One 2400g, For 0-6 Month-Old Infants
a+...two...6-12months...11.2kg...milk
a+...two...11.2kg 6-12months ..milk
Product 200g (10x2g)
[200g] Product
Product A brand(300g)
Product 200g (20g x 10)';
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