Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

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


{filelink=13362}

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

No comments yet.

Leave a Comment