I want to match only the first letter of the string i.e 'bot'.
For ex:
It should run a function if user types "bot hi"
and should not work if they type "hi bot there"
if(preg_match('[bot ]', strtolower($message))) {
$msg = str_replace('bot ', '', $message);
//Some message response
}
the above code works even if I type "hi bot there"