3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<STRING This, actually, is (a) nice' old'er string, as Raphaƫl said, "divided and conquered"! STRING; var_export( preg_match_all("~[\pL\pM]+[\pL\pM'-]*(?<!['-])~u", $string, $matches) ? $matches[0] : [] );

preferences:
27.65 ms | 405 KiB | 5 Q