title: how to write a regular expression in PHP if statment
body: <p>I am writing a chat bot in PHP.</p>
  
  <p>here is a part of the code</p>
  
  <pre><code>public function messageReceived($from, $message){
          $message = trim($message);
  
                  if(stristr($message,"hi")|| stristr($message,"heylo")||stristr($message,"hello")||stristr($message,"yo")||stristr($message,"bonjour")){
              return "Hello,$from,how are you"; // help section
          }
  </code></pre>
  
  <p>now in the if statement ,can i use a regular expression such that if the message starts with :
  H or Y it will return the given statement.</p>
  
  <p>something of sort:</p>
  
  <p>H* || Y* in formal languages</p>
  
  <p>is there any such way to do that?</p>