Phone:
preg_match('/^1[3456789]{1}\d{9}$/',$phone
mailbox:
PHP mail regular expression code is as follows:
/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/
Examples
Output code is run results:
array(4) { [0]=> string(17) "[email protected]" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(4) ".com" }