We can use the preg_match() function with “/^$/” as the regular expression pattern.
Ex: <?php preg_match("/^heat$/","wheat",$match); echo $match[1]; ?>