Guest User

Untitled

a guest
May 26th, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. $string = "igoer@gmail.com igoesdr@gmail.com igoer@MAIL.ru igoer@gmail.com sfkjhg@zuzu.com";
  2. $exp = explode(" ", $string); // получаем каждый email
  3.  
  4. // проходимся циклом по емейлам
  5. foreach ($exp as $key) {
  6. if (!preg_match('/(.*@gmail.com)$/ui', $key)) {
  7. echo $key; // валидные
  8. }
  9. }
Add Comment
Please, Sign In to add comment