Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $string = "igoer@gmail.com igoesdr@gmail.com igoer@MAIL.ru igoer@gmail.com sfkjhg@zuzu.com";
- $exp = explode(" ", $string); // получаем каждый email
- // проходимся циклом по емейлам
- foreach ($exp as $key) {
- if (!preg_match('/(.*@gmail.com)$/ui', $key)) {
- echo $key; // валидные
- }
- }
Add Comment
Please, Sign In to add comment