See others write the regular is as follows:
if (!preg_match ('/^[\w\-\. +@[\w\-\.] + (\.\w+) +$/', $_string))
In the middle brackets and inside of the understanding, I am like this: the brackets denote any one of them;
Well, it [\w\-\] in the above paragraph. I understand that the first one in the front can be any English characters, or bars, or dots.
If the above understanding is correct, then the problem comes, this code is to verify the correctness of the email.
People know that the first e-mail can not be a horizontal bar, this is wrong?
Reply to discussion (solution)
Many mailbox checks are now rough checks, because some providers do support weird writing. I think it would be better to slip through, not to catch, and not to be used by users.
Attached to a Dropbox foreign website, email authentication source code:
$r = Preg_match ('/^[a-za-z0-9!#$%&\ ' *+\/=?^_ ' {|} ~-]+(\. [a-za-z0-9!#$%&\ ' *+\/=?^_ ' {|} ~-]+) *@[a-za-z0-9-]+ (\.[ a-za-z0-9-]+) *\. ([A-za-z]{2,}) $/', $email);
Many mailbox checks are now rough checks, because some providers do support weird writing. I think it would be better to slip through, not to catch, and not to be used by users.
Attached to a Dropbox foreign website, email authentication source code:
$r = Preg_match ('/^[a-za-z0-9!#$%&\ ' *+\/=?^_ ' {|} ~-]+(\. [a-za-z0-9!#$%&\ ' *+\/=?^_ ' {|} ~-]+) *@[a-za-z0-9-]+ (\.[ a-za-z0-9-]+) *\. ([A-za-z]{2,}) $/', $email);
You two, irrelevant! What I'm asking is my understanding, right, you two?
Your regular can match ... @....net
You're right, aren't you?
Many mailbox checks are now rough checks, because some providers do support weird writing. I think it would be better to slip through, not to catch, and not to be used by users.
Attached to a Dropbox foreign website, email authentication source code:
$r = Preg_match ('/^[a-za-z0-9!#$%&\ ' *+\/=?^_ ' {|} ~-]+(\. [a-za-z0-9!#$%&\ ' *+\/=?^_ ' {|} ~-]+) *@[a-za-z0-9-]+ (\.[ a-za-z0-9-]+) *\. ([A-za-z]{2,}) $/', $email);
You two, irrelevant! What I'm asking is my understanding, right, you two?
Your attitude is destined for your development.
\w uppercase and lowercase letters, numbers, underscores
This can be matched to. @. __ _@_._-@-.0 .....
There is a problem with the regular
Understanding is no problem, attitude is a problem.
There's something wrong with your mother.