$re = '/(?<!-)((\d+(\.\d+)?))(\s*[xX]\s*\d+(\.\d+)?){1,2}\s*(mm|cm|mtrs|ft|yd)/';
$str = '120x200mm matches
12.2x200.3mtrs matches
2x21x21cm // needs to match
100\\\' X 130\\\'
4 acres
0.54
0.488 (90x223)/ GIS0.78
90x160
100x149.7x123
143.76 X 453.52
6.13 per tax bill
120x378 per tax roll';
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