$re = '/\b\d[\d\- ]*[A-Z]?\b/';
$str = 'Via Treviso Mare 2 => need to detect 2
8C via Sergio Leone => need to detect 8C
Strada Provinciale 22 C => need to detect 22 C
19-20 Frazione Santa Maria => need to detect 19-20
9 - 11 via Giare => need to detect 9 - 11
Via Cesare Taiti 18-B => need to detect 18-B';
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