php regex is phone code example Example: php program to validate phone number using regular expression preg_match('/^[0-9]{10}+$/', $mobile)