PHP 正则表达式函数preg_match()
PHP 正则表达式函数preg_match()
<?php
$line = "Vi is the greatest word processor ever created!";
// perform a case-Insensitive search for the word "Vi"
if (preg_match("/\bVi\b/i", $line, $match)) :
print "Match found!";
endif;
?>