$re = '/(.+) (HC|PO|bbt|bty|bjx|prs|bag|gls|nst|resort|shs|cts|atm|bls|gls|jck|clp|fsh|glv|bck|blt|drs|sle|hts|emn|ham|pre fall|str|pnt|skr|mat|m PO|bks|m |PreFall|Resort|brd|LO|AR|sok|F |S )|.+/m';
$str = 'London str F20 212.jpg London
Luisa Spagnoli bbt S22 048.jpg Luisa Spagnoli
Marco Rambaldi bjx S22 006.jpg Marco Rambaldi
Max Mara bag S22 002.jpg Max Mara';
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