Use word boundaries:
$s = <<< EOF
Once upon a midnight dreary,
while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore,
EOF;
echo preg_replace('/(^|\s)(weary|weak|we|ary)\b/i', '$1<span>$2</span>', $s);
OUTPUT:
Once upon a midnight dreary,
while I pondered, <span>weak</span> and <span>weary</span>,
Over many a quaint and curious volume of forgotten lore,