Expression régulière: Exemple d’utilisation de ‘ereg( )’ pour analyser une chaîne

Author:


Download

<html>
<head>
<title>Expression régulière</title>
</head>
<body>

<?php

    $email = 'test@demo.fr';

    if (ereg ('([[:alpha:]]+)@([[:alpha:]]+).([[:alpha:]]{2,4})', $email, $matches))
    {
      echo "Test Réussi.<br/>";
      var_dump ($matches);
    }
    else
    {
      echo "Test Echoué.";
    }

?>

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


six + = 13