What am I missing on this?
My intent was to extract all words with a 'th' in them, regardless of position.
If I have
$subject = "There was this forthright man";
$pattern = '/\wth\w\W/i';
and use
preg_match_all ($pattern, $subject, $aMatch);
then I get the correct number of matches, 3.
(There, this, forthright)
But why does
$pattern = '/\W\wth\w\W/i';
yield only one match: (this)?
Thanks for any tips,
Csaba Peter Gabor