Expression régulière: Afficher le tableau de résultat d’un ‘match’

Author:


Download

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

<?php
$email = "contact@mesexemples.co";

$anatomie_email = ereg("([[:alnum:]]+)@([[:alnum:]]+).([[:alnum:]]+)", $email, $regs);

if ($anatomie_email) :
 foreach($regs as $elem)
   {
    echo $elem."<br/>";
   }

endif;
?>

</body>
</html>

Leave a Reply

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


4 + = seven