re-phrase the question to the one that only needs letters regardless of other characters:
$paragraph = "o'reilly and peter's dogs and cats\n hello, boy!";
preg_match_all('~\b\w++(?>\'\w++)*+~', $paragraph, $matches);
var_dump($matches[0]);
https://3v4l.org/pZ8El
a to z A to Z and 0 to 9 ???
Обсуждают сегодня