Try this regex.
https://regex101.com/r/Evd3iF/1
$re = '/\b[Aa]ny\b/';
$str = 'Company any any. Any, ';
If(preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0)){
//string contains word
}
// Print the entire match result
var_dump($matches);
The word to pattern can be made with
$pattern = "/\b[" . strtoupper(Substr($word,0,1)) . strtolower(Substr($word,0,1)) . "]" . Substr($word,1);
Please note I wrote this answer on my phone, so I may have made a mistake in the above pattern