email validation in java without regular expression
email validation in java without regular expression
Read about email validation in java without regular expression, The latest news, videos, and discussion topics about email validation in java without regular expression from alibabacloud.com
The domain name format is as follows:A domain name is composed of a specific character set, English letters, numbers, and "-" (that is, a hyphen or minus sign) of Chinese Characters in different countries, but cannot start or end with "-". "-" cannot appear consecutively. The domain name is case-insensitive. The domain name can contain up to 60 bytes (including the suffix. com,. net, and. org )./^ [A-z] ([a-z0-9] * [-_]? [A-z0-9] +) * @ ([a-z0-9] * [-_]? [A-z0-9] +) + [\.] [a-z] {2, 3} ([\.] [a-
If the user enters the HTTP://AAA.BBB.CCC
The following code converts his input into a HTTP://AAA.BBB.CCC
We look at the regular expression of how powerful, hehe.
' Call this function to display as a super join
Response.Write to_html (S_message)
%>
Function to_html (s_string)
to_html = Replace (s_string, "" "", "" ")
to_html = Replace (to_html, "to_html = Replace (to_html, ">", ">")
to_html = Replace (to
I. Related code1 function test ()2 {3 var temp = document. getElementById ("text1 ");4 // email Verification5 var myreg =/^ ([a-zA-Z0-9] + [_ | \.]?) * [A-zA-Z0-9] + @ ([a-zA-Z0-9] + [_ | \.]?) * [A-zA-Z0-9] + \. [a-zA-Z] {2, 3} $ /;6 if (! Myreg. test (temp. value ))7 {8 alert ('prompt \ n please enter a valid E_mail! ');9 myreg. focus ();10 return false;11}12}13 // because the methods are the same, write only the relevant
Requirements:(1) email prefix rules:A string of 26 English letters, 10 Arabic numerals, dots, minus signs, or underscores. It can only start and end with a number or letter.(2) domain name naming rules:It consists of 26 English letters, 10 Arabic numerals, and minus signs. It can only start and end with a number or letter and cannot exceed 63 characters in total.(3) case insensitive.
Expression:
^ (?! (\.
$str = ' People's Republic of China 123456789ABCDEFG ';
Echo Preg_match ("/^[\u4e00-\u9fa5_a-za-z0-9]{3,15}$", $strName);
?>
Copy CodeRunning the above code, you will be prompted: Warning:preg_match (): compilation Failed:pcre does not support \l, \l, \ n, \p, \p, \u, \u, or \x at offset 3 In F:\wwwroot\php\test.php on line 2The reason for this is because: the following Perl escape sequences are not supported in PHP regular ex
('. '); },/** * [True is overflow, false is non-overflow] * @param {[String]} v [number] */isoverflow:function (v , Len) {var L = v.length; Len >> 0; return l > Len; },/** * ID number and binding with "*" ID number verification **/isid:function (val) {val = Val.replace (/\s+/g, ' ); Return/(^\d{17} ([0-9]| X)) | (^[1-9]{1}[*]{16}[0-9| X]) $/.test (Val); },/** * Binds the bank card number and the user entered the bank card * @param string as well as
public class Verifyutils {/** * Verify phone format */public static Boolean Ismobileno (String mobiles) {/* * move: 134, 135, 136, 137, 138, 139 , 150, 151, 157 (TD), 158, 159, 187, 188 * Unicom: 130, 131, 132, 152, 155, 156, 185, 186 Telecom: 133, 153, 180, 189, (1349 Wei Tong) * summed up is the first must be 1, The second digit must be 3 or 5 or 8, the other location can be 0-9 *///string telregex = "[1][3578]\\d{9}";//"[1]" for the 1th digit 1, "[358]" for the second bit can be 3, 5, 8 One,
The following is a regular expression that validates an e-mail message
The code is as follows
Copy Code
var re =/^w+ ([.-]?w+) *@w+ ([.-]?w+) * (. w{2,3}) +$/;
Cases
The code is as follows
Copy Code
Please enter a valid mailbox: The mailbox you entered is valid. Thank you!
Now we're going to start dissecting this
Part 1ArticleWe use the string SEARCH method to verify the ASP email address. It may be a friend who prefers regular expressions.Code.Method 1
Copy code The Code is as follows: public function chkmail (byval email)
Dim rep, pmail: chkmail = true: Set rep = new Regexp
Rep. pattern = "([. a-zA-Z0-9 _-]) {} @ ([a-zA-Z0-9 }(. ([a-zA-Z0-9]) {2,}) {} $"
Pmail = rep.
Data validation of a subexpression (subexpressions), which decomposes the subexpression of a regular expression by means of parentheses "()";
Then use the subscript designator [], output the corresponding subexpression, "0" on behalf of the whole, "1" for the first bracket, followed by accumulator;
Verify the match of the r
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.