Read the PHP Manual, I linked to it in my post. A hard coded example would be:
<?php
$pattern = '/.*y.*a.*h.*o.*o.*/i';
$subject = 'Yellow always has been a good color for me';
if (preg_match($pattern, $subject)) {
echo 'Word found.';
} else {
echo 'Word not found.';
}
?>
thats a whole other kettle of fish
It is precisely what was asked for in the original post, and is why strpos() is not the right tool for the job here.