For instance:
$t = "Normal text éèàêâûôîùÈ more text";
preg_match_all('/[^\P{Latin}\x00-\x80]+/u', $t, $m);
print_r($m);
Result:
Array
(
[0] => Array
(
[0] => éèàêâûôîùÈ
)
)
Basically, it selects all the "Latin" characters (= letters), except those that are in the lower ascii range (= a..z). Not sure if this can be called a "shortcut" though;)
source
share