Use stripos instead of regexes.

stripos is considerably faster than preg_match.