function inStrRx($haystack, $needle) { $contained = (bool) preg_match($needle, $haystack); return $contained; }