miércoles, 4 de marzo de 2015

php regular expresion

<?

$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;


echo "<br>";


if (preg_match("/\bweb\b/i", "PHP is the web scripting language of choice.")) {
    echo "A match was found.";
} else {
    echo "A match was not found.";
}

?>

No hay comentarios:

Publicar un comentario