Its syntax follows: int preg_match (string pattern, string string [, array pattern_array]) <? $line = "virtual"; if (preg_match("/\bVi\b/i", $line, $match)) : print "Match found!"; endif; ?>