I want to know how this regular expression is expand and how it validates proper E-mail address ?
"^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)↪*(\.[a-z]{2,3})$"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What is a valid email address? It’s usually name@FQDN
Whereby FQDN is “fully qualified domain name”
A FQDN must consist of one hostname and one top-level domain.
It CAN have one or more optional subdomains.
^start of match (see below)[_a-z0-9-]+the very first character of a valid email account name (required, hence the + qualifier 1..n)(\.[_a-z0-9-]+)*optional characters for a valid email account name (hence the * quantifier 0..n)@@-literal (delimiting account name from FQDN)[a-z0-9-]+character set for domain names (second-level domains / subdomain)(\.[a-z0-9-]+)*character set for domain names (second-level domains / subdomain)(\.[a-z]{2,3})character set for top level domains (.com, .net, etc. – won’t be useful for the ‘new’ TLDs like .info, .business, .museum and so on$end of matchThat
^ . . . $is often used to declare that the whole string must consist of the pattern (and not just include it somewhere).