In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "JS mailbox verification regular expression example analysis", the content is easy to understand, clear, hope to help you solve doubts, the following let Xiaobian lead you to study and learn "JS mailbox verification regular expression sample analysis" this article.
The following mailboxes are regular:
Underlined: the underlined domain name is the carrying pole domain name mentioned in Mi Nongkou. Because the carrying pole domain name is more troublesome to enter and looks more irregular, it does not have much value. At present, there are relatively few investors. According to DNS standards, domain names are not allowed to be underlined.
Underlining: some people like to use an underscore when registering a user name, which is troublesome when logging in to the mailbox, and it's also inconvenient for the person who sends you an email.
The second-level domain name mailbox is basically eliminated, and the rules of this buddy can be underlined, expanding the scope but not a big problem, mainly to prompt the user.
Com.cn domain name supports: (\. [a-zA-Z0-9 -] {2pr 3}) {1pr 2} com.cn
/ / emailpreg = / ^ [A-Za-zd] + ([- _.] [A-Za-zd] +) * @ ([A-Za-zd] + [-.]) + [A-Za-zd] {2pm 5} $/; / this mailbox for the QQ number cannot be verified.
Emailpreg = / ^ ([a-zA-Z0-9 cards -]) + @ ([a-zA-Z0-9 stories -]) + ((\ .[ a-zA-Z0-9 seconds -] {2pm 3}) {1jj 2}) $/; / / dfdfd1212@dfdfd.abc.cn is a second-level mailbox. Abc@12df1.com.cn
Emailpreg = / ^ ([a-zA-Z0-9 minutes -]) + @ ([a-zA-Z0-9 -]) + ((\ .[ a-zA-Z0-9 -] {2Power3})) $/; / the domain name is not allowed to have an underscore, remove the underscore, this is the final regular. As for any initials that cannot be underlined, the rule will have to be lengthened. The user is not sb, it just plays a role as a hint, don't make it complicated, that's it.
} else if ($(this) .attr ('res') = =' 2' & &! emailpreg.test ($(this). Val ()) {/ / the mailbox cannot be obtained from the user's big network interface logged in by QQ, let it fill in.
$(this) .css ("border", "1px solid # f00")
$("#" + $(this) .attr ('res') +' span') .remove ()
$("#" + $(this) .attr ('res')) .after ("" + $(this) .attr ("rel") + "incorrect format")
(this) .focus ()
Res = false
Return false
The JavaScript form validates email and determines whether an input is a mailbox email, which is achieved by regular expressions.
/ / check email mailbox function isEmail (str) {var reg = / ^ ([a-zA-Z0-9 expressions -]) + @ ([a-zA-Z0-9 expressions -]) + ((\. [a-zA-Z0-9 posts -] {2 zA-Z0 3}) $/; return reg.test (str);} above are all the contents of the article "sample Analysis of regular expressions for JS Mailbox Verification". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.