Analyze and check the regular expression of the email. How do we use to check the regular expression of email? What are the steps required to check the regular expression of email? If you want to check the regular expression of an email, how can we check the regular expression of an email? What are the steps required to check the regular expression of email? The operation instance for checking the regular expression of email will show you in detail.
Let's continue to discuss how to verify an email address. there are three parts in a complete email address: POP3 user name (everything on the left of '@'), '@', and server name (that is, the remaining part ). the user name can contain uppercase and lowercase letters, Arabic numerals, periods ('. '), minus sign ('-'), and underline ('_'). the server name also complies with this rule, except for the underlines.
Check the discussion about the regular expression of email:
The start and end of the user name cannot be a period. the same is true for servers. you cannot have at least one character between two consecutive periods. now let's take a look at how to write a matching pattern for the user name:
^ [_ A-zA-Z0-9-] + $
The end cannot exist yet. we can add the following:
^ [_ A-zA-Z0-9-] + (. [_ a-zA-Z0-9-] +) * $
The above means: "There is at least one canonicalized character (except. unexpected), followed by 0 or more strings starting with a point ."
Check the implementation of the regular expression of email:
To simplify it, we can use eregi () to replace ereg (). eregi () is case-insensitive and we don't need to specify two ranges: "a-z" and "A-Z"-just specify one:
^ [_ A-z0-9-] + (. [_ a-z0-9-] +) * $
The server name is the same, but the underline should be removed:
^ [A-z0-9-] + (. [a-z0-9-] +) * $
Done. now you only need to use @ to connect the two parts:
^ [_ A-z0-9-] + (. [_ a-z0-9-] +) * @ [a-z0-9-] + (. [a-z0-9-] +) * $
This is the complete email authentication matching mode. you only need to call
Eregi ('^ [_ a-z0-9-] + (. [_ a-z0-9-] +) * @ [a-z0-9-] + (. [a-z0-9-] +) * $ ', $ eamil)
Then you can check whether the email is used.
Here we will introduce you to the content related to checking the regular expression of email. I hope it will be helpful for you to understand and learn how to check the regular expression of email.
Why? What are the steps required to check the regular expression of email? Check the operation instance of the regular expression of the email...