<?php $string = 'a@-b.cd'; $pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i'; preg_match_all($pattern, $string , $matches); var_dump($matches[0]);
You have javascript disabled. You will not be able to edit any code.