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