Regular Expression instance

Source: Internet
Author: User

1. Verification Number:
Only one number can be entered

 
Expression ^ \ D $
The description matches a number.
Matching example 0, 1, 2, 3
Example of Mismatch

2. Only n numbers can be entered
Expression ^ \ D {n} $ for example ^ \ D {8} $
The description matches 8 numbers.
Matching example: 12345678,22223334, 12344321
Example of Mismatch


3. You can only enter at least N numbers.
Expression ^ \ D {n ,}$ for example ^ \ D {8,} $
The description matches at least N numbers.
Matching example: 12345678,123456789, 12344321
Example of Mismatch


4. Only M to N numbers can be entered
Expression ^ \ D {M, N }$ for example ^ \ D {7, 8} $
The description matches m to N numbers.
Matching example: 12345678,1234567
Example of mismatched 123456,123456789


5. Only numbers can be entered.
Expression ^ [0-9] * $
The description matches any number.
Matching example: 12345678,1234567
Unmatched example E, clear month, http://blog.csdn.net/21aspnet


6. Only numbers in a certain range can be entered.
Expression ^ [12-15] $
Describe the number that matches a certain range
Matching example :,
Example of Mismatch


7. Only numbers with 0 and non-0 headers can be entered.
Expression ^ (0 | [1-9] [0-9] *) $
The description can be 0, the first number cannot be 0, and the number can contain 0
Matching example 101,100
Unmatched example 01, clear month, http://blog.csdn.net/21aspnet


8. Only real numbers can be input.
Expression ^ [-+]? \ D + (\. \ D + )? $
Description matching real number
Example 18, + 3.14,-9.90
Example of mismatched. 6, 33 S, 67-99


9. Only positive numbers of N decimal places can be entered.
Expression ^ [0-9] + (. [0-9] {n })? $ With ^ [0-9] + (. [0-9] {2 })? $ Example
Describe the positive number matching n decimal places
Example of matching 2.22
Unmatched example 2.222,-2.22, http://blog.csdn.net/21aspnet


10. Only the positive number of M-N decimal places can be entered.
Expression ^ [0-9] + (. [0-9] {m, n })? $ With ^ [0-9] + (. [0-9] {1, 2 })? $ Example
Describe the positive number of M to N decimal places
Matching examples 2.22, 2.2
Unmatched example 2.222,-2.2222, http://blog.csdn.net/21aspnet


11. Only positive integers other than 0 can be entered.
Expression ^ \ +? [1-9] [0-9] * $
Describe to match a positive integer other than 0
Matching example 2, 23, 234
Example 0,-4,


12. Only negative integers other than 0 can be entered.
Expression ^ \-[1-9] [0-9] * $
Describe to match a non-0 negative integer
Example of matching-2,-23 and-234
Examples of unmatched values 0, 4,


13. Only n characters can be entered
The expression ^. {n} $ takes ^. {4} $ as an example.
The description matches n characters. Note that the Chinese character is only one character.
Matching example 1234, 12we, 123 Clear, clear moon
Unmatched example 0,123,123 WWW, http://blog.csdn.net/21aspnet/


14. Only English characters can be entered
Expression ^. [A-Za-Z] + $
The description matches English characters and is case-insensitive.
Example of matching ASP, WWW,
Unmatched example 0,123,123 WWW, http://blog.csdn.net/21aspnet/


15. Only uppercase English characters can be entered
Expression ^. [A-Z] + $ as an Example
Description matching uppercase English characters
Matching example net, WWW,
Mismatched example 0,123,123 WWW,


16. Only lowercase English characters can be entered
Expression ^. [A-Z] + $
Description matching uppercase English characters
Example of matching ASP and csdn
Example 0, net, WWW,


17. Only English characters and numbers can be entered
Expression ^. [A-Za-z0-9] + $ as an Example
Description matching English characters + numbers
Example of matching: 1asp, w1w1w,
Unmatched example 0,123,123, WWW, http://blog.csdn.net/21aspnet/


18. Only English characters, numbers, and underscores can be entered.
The expression ^ \ W + $ is used as an example.
The description matches English characters, numbers, and underscores.
Example of matching: 1asp, WWW, 12,1_w
Unmatched Example 3 #, 2-4, w # $, http://blog.csdn.net/21aspnet/


19. Password example
Expression ^. [A-Za-Z] \ W {m, n} $
The description matches the M-n characters starting with an English character and can only contain numbers, letters, and underscores.
Matching example
Example of Mismatch


20. Verify uppercase letters
Expression \ B [^\ Wa-z0-9 _] [^ \ WA-Z0-9 _] * \ B
The first letter of the description can only be capitalized.
Example of matching ASP, Net
Unmatched example http://blog.csdn.net/21aspnet/


21. Verify the URL (? Id = Chinese) vs. net2005 does not have this function
Expression ^ http: \/([\ W-] + (\. [\ W-] +) + (\/[\ W -.\/\? % & = \ U4e00-\ u9fa5] *)? $
 
Description verification tape? Id = Chinese
Matching example http://blog.csdn.net/21aspnet,
Http://blog.csdn.net? Id = clear moon
Example of Mismatch


22. Verify Chinese Characters
Expression ^ [\ u4e00-\ u9fa5] {0,} $
Description can only contain Chinese Characters
Matching example: Clear moon
Unmatched example http://blog.csdn.net/21aspnet/


23. Verify the QQ number
Expression [0-9] {5, 9}
Description: QQ number of 5-9 digits
Example of matching
Unmatched example 10000 W, http://blog.csdn.net/21aspnet/


24. verify email (verify the same MSN number)
Expression \ W + ([-+. '] \ W +) * @ \ W + ([-.] \ W + )*\. \ W + ([-.] \ W + )*
Description Note: MSN can use a non-hotmail.com mailbox.
Example of matching [email protected]
Example of mismatched [email protected]. http://blog.csdn.net/21aspnet/


25. Verify the ID card number (for rough verification, it is best to tune the class library on the server side for further verification)
Expression ^ [1-9] ([0-9] {16} | [0-9] {13}) [xX0-9] $
Description
For example, if the ID card number is 15 or 18 digits, the ID card number with X is supported.
Unmatched example http://blog.csdn.net/21aspnet/


26. Verify the mobile phone number (including 159, excluding PHS)
Expression ^ 13 [0-9] {1} [0-9] {8} | ^ 15 [9] {1} [0-9] {8}
The description contains the mobile phone number 159-130.
Matching example 139 XXXXXXXX
Unmatched example 140 XXXXXXXX, http://blog.csdn.net/21aspnet/


27. Verify the phone number (very complicated, vs. net2005 gave the error)
Expression (imperfect) solution 1 (\ D {3} \) | \ D {3}-) | (\ D {4 }\) | \ D {4 }-))? (\ D {8} | \ D {7 })
Solution 2 (^ [0-9] {3, 4} \-[0-9] {3, 8} $) | (^ [0-9] {3, 8} $) | (^ \ ([0-9] {3, 4} \) [0-9] {3, 8} $) | (^ 0 {0, 1} 13 [0-9] {9} $) mobile phone numbers are supported but not perfect.
Description Shanghai: 02112345678 3 + 8 digits
Shanghai: 021-12345678
Shanghai: (021)-12345678
Shanghai: (021) 12345678
Zhengzhou: 03711234567 4 + 7 places
Hangzhou: 057112345678 4 + 8 places
There is also an extension number, country code.
Because the situation is very complex, we do not recommend that the front-end do 100% verification. So far, no one seems to be able to write a file containing all types. In fact, many situations are in conflict.
If anyone has a better phone number, leave a message.
 
Matching example
Example of Mismatch


28. verify passport
Expression (P \ D {7}) | G \ D {8 })
 
Description verification P + 7 digits and G + 8 digits
Matching example
Examples of mismatched clear moon, http://blog.csdn.net/21aspnet/


29. Verify the IP address
Expression ^ (25 [0-5] | 2 [0-4] [0-9] | [0-1] {1} [0-9] {2} | [1-9] {1} [0-9] {1} | [1-9]) \. (25 [0-5] | 2 [0-4] [0-9] | [0-1] {1} [0-9] {2} | [1- 9] {1} [0-9] {1} | [1-9] | 0) \. (25 [0-5] | 2 [0-4] [0-9] | [0-1] {1} [0-9] {2} | [1- 9] {1} [0-9] {1} | [1-9] | 0) \. (25 [0-5] | 2 [0-4] [0-9] | [0-1] {1} [0-9] {2} | [1- 9] {1} [0-9] {1} | [0-9]) $
 
Description verification IP Address
Example of matching: 192.168.0.1 222.234.1.4
Example of Mismatch


30. Verify the domain
Expression ^ [a-zA-Z0-9] + ([a-zA-Z0-9 \-\.] + )? \. S |) $
 
Description verification domain
Example of matching csdn.net Baidu.com it.com.cn
Example of mismatched 192.168.0.1


31. Verify credit card
Expression ^ ((? : 4 \ D {3}) | (? : 5 [1-5] \ D {2}) | (? : 6011) | (? : 3 [68] \ D {2}) | (? : 30 [012345] \ D) [-]? (\ D {4}) [-]? (\ D {4}) [-]? (\ D {4} | 3 [4, 7] \ D {13}) $
 
Description verification: Visa, MasterCard, discover, and American Express Card
Matching example
Example of Mismatch


32. Verify ISBN International Standard No.
Expression ^ (\ D [-] *) {9} [\ dxx] $
 
Description verification ISBN International Standard No.
Example of matching 7-111-19947-2
Example of Mismatch


33. Verify guid globally unique identifier
Expression ^ [A-Z0-9] {8}-[A-Z0-9] {4}-[A-Z0-9] {4}-[A-Z0-9] {4}-[A-Z0-9] {12} $
 
Description format: 8-4-4-4-12
Example of matching: 2064d355-c0b9-41d8-9ef7-9d8b26524751
Example of Mismatch


34. Verify the file path and extension
Expression ^ ([A-Za-Z] \: |\\) \ ([^ \] + \) * [^ \/:*? "<> |] + \. Txt (l )? $
 
Description check path and file extension
Matching example E: \ mo.txt
Example of mismatch E: \, mo.doc, E: \ mo.doc, http://blog.csdn.net/21aspnet/


35. Verify the HTML color value
Expression ^ #? ([A-F] | [A-F] | [0-9]) {3} ([A-F] | [A-F] | [0-9]) {3 })? $
 
Description Check color value
Matching example # ff0000
Unmatched example http://blog.csdn.net/21aspnet/

^ [1-9] \ D * \. \ D * | 0 \. \ D * [1-9] \ D * $

Integer or decimal point: ^ [0-9] + \. {} [0-9] {} $
Only numbers are allowed: "^ [0-9] * $ ".
Only n digits can be entered: "^ \ D {n} $ ".
You can only enter at least N digits: "^ \ D {n,} $ ".
Only M ~ can be input ~ N-digit :. "^ \ D {m, n} $"
Only numbers starting with zero and non-zero can be entered: "^ (0 | [1-9] [0-9] *) $ ".
Only positive numbers with two decimal places can be entered: "^ [0-9] + (. [0-9] {2 })? $ ".
Only 1 ~ Positive number of three decimal places: "^ [0-9] + (. [0-9] {1, 3 })? $ ".
Only a non-zero positive integer can be entered: "^ \ +? [1-9] [0-9] * $ ".
Only a non-zero negative integer can be entered: "^ \-[1-9] [] 0-9" * $.
Only 3 characters can be entered: "^. {3} $ ".
You can only enter a string consisting of 26 English letters: "^ [A-Za-Z] + $ ".
You can only enter a string consisting of 26 uppercase letters: "^ [A-Z] + $ ".
You can only enter a string consisting of 26 lower-case English letters: "^ [A-Z] + $ ".
You can only enter a string consisting of a number and 26 English letters: "^ [A-Za-z0-9] + $ ".
You can only enter a string consisting of digits, 26 English letters, or underscores (_): "^ \ W + $ ".
Verify the User Password: "^ [A-Za-Z] \ W {5, 17} $". The correct format is: start with a letter, with a length of 6 ~ It can only contain characters, numbers, and underscores.
Check whether ^ % & ',; =? $ \ "And other characters:" [^ % & ',; =? $ \ X22] + ".
Only Chinese characters can be entered: "^ [\ u4e00-\ u9fa5] {0,} $"
Verify email address: "^ \ W + ([-+.] \ W +) * @ \ W + ([-.] \ W + )*\. \ W + ([-.] \ W +) * $ ".
Verify interneturl: "^ http: // ([\ W-] + \.) + [\ W-] + (/[\ W -./? % & =] *)? $ ".
Verification phone number: "^ (\ D {3, 4}-) | \ D {3.4 }-)? \ D {7,8} $ "correct format:" XXX-XXXXXXX "," XXXX-XXXXXXXX "," XXX-XXXXXXX "," XXX-XXXXXXXX "," xxxxxxx "and" XXXXXXXX ".
Verify the ID card number (15 or 18 digits): "^ \ D {15} | \ D {18} $ ".
12 months of verification: "^ (0? [1-9] | 1 [0-2]) $ "the correct format is:" 01 "~ "09" and "1 "~ "12 ".
31 days of verification for a month: "^ (0? [1-9]) | (1 | 2) [0-9]) | 30 | 31) $ "the correct format is;" 01 "~ "09" and "1 "~ "31 ".
Regular Expression matching Chinese characters: [\ u4e00-\ u9fa5]

Match double-byte characters (including Chinese characters): [^ \ x00-\ xFF]

Application: Calculate the length of a string (two-byte length Meter 2, ASCII character meter 1)
String. Prototype. Len = function () {return this. Replace (/[^ \ x00-\ xFF]/g, "AA"). length ;}

Regular Expression for matching empty rows: \ n [\ s |] * \ r

Regular Expressions matching HTML tags: <(. *)> (. *) <\/(. *) >|< (. *) \/>

Regular Expression matching spaces at the beginning and end: (^ \ s *) | (\ s * $)

Application: JavaScript does not have trim functions like VBScript. We can use this expression to implement it, as shown below:

String. Prototype. Trim = function ()
{
Return this. Replace (/(^ \ s *) | (\ s * $)/g ,"");
}

Use regular expressions to break down and convert IP addresses:

The following is a javascript program that uses regular expressions to match IP addresses and convert IP addresses to corresponding values:

Function ip2v (IP)
{
Re =/(\ D +) \. (\ D +)/g // Regular Expression matching IP addresses
If (Re. Test (IP ))
{
Return Regexp. $1 * Math. Pow (255) + Regexp. $2 * Math. Pow () + Regexp. $3 * + Regexp. $4*1
}
Else
{
Throw new error ("not a valid IP address! ")
}
}

However, if the above program does not use regular expressions, it may be easier to directly use the split function to separate them. The program is as follows:

VaR IP = "10.100.0000168"
IP = IP. Split (".")
Alert ("the IP value is: "+ (IP [0] * 255*255*255 + IP [1] * 255*255 + IP [2] * 255 + IP [3] * 1 ))

The regular expression matching the email address: \ W + ([-+.] \ W +) * @ \ W + ([-.] \ W + )*\. \ W + ([-.] \ W + )*

The regular expression matching the URL: http: // ([\ W-] + \.) + [\ W-] + (/[\ W -./? % & =] *)?


Use regular expressions to restrict text box input in a webpage form:

You can only enter Chinese characters using regular expressions: onkeyup = "value = value. replace (/[^ \ u4e00-\ u9fa5]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ u4e00-\ u9fa5]/g ,''))"

You can only enter the full-width characters: onkeyup = "value = value. replace (/[^ \ uff00-\ Uffff]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ uff00-\ Uffff]/g ,''))"

Use a regular expression to limit that only numbers can be entered: onkeyup = "value = value. replace (/[^ \ D]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ D]/g ,''))"

You can only enter numbers and English letters using regular expressions: onkeyup = "value = value. replace (/[\ W]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ D]/g ,''))"

<Input onkeyup = "value = value. replace (/[^ \ u4e00-\ u9fa5 \ W]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ u4e00-\ u9fa5 \ W]/g, '')" value = "underlines, numbers, letters, and Chinese characters allowed">

<Script language = "JavaScript">
If (document. layers) // triggers a keyboard event
Document. captureevents (event. keypress)

Function xz (thsv, NOb ){
If (NOB = "2 "){
Window. clipboardData. setdata ("text ","")
Alert ("avoid illegal character input, do not copy characters ");
Return false;
}
If (event. keycode! = 8 & event. keycode! = 16 & event. keycode! = 37 & event. keycode! = 38 & event. keycode! = 39 & event. keycode! = 40 ){
Thsvv = thsv. value; // input value
Thsvs = thsvv. substring (thsvv. Length-1); // The last character entered
// Thsvss = thsvv. substring (0, thsvv. Length-1); // remove the last Error Character
If (! Thsvs. Replace (/[^ \ u4e00-\ u9fa5 \ W]/g, '') | event. keycode = 189) {// Regular Expression removes symbols and underline keys
Thsv. value = 'do not enter the invalid symbol [' + thsvs + ']';
Alert ('Do not enter invalid symbols ['+ thsvs +'] ');
Thsv. value = "";
Return false;
}
}
}

</SCRIPT>

<Input onkeyup = "xz (this, 1)" onpaste = "xz (this, 2)" value = ""> allow numbers, letters, and Chinese characters

<Script language = "JavaScript">
<! --
Function maxlength (field, maxlimit ){
VaR J = field. value. Replace (/[^ \ x00-\ xFF]/g, "**"). length;
// Alert (j );
VaR tempstring = field. value;
VaR TT = "";
If (j> maxlimit ){
For (VAR I = 0; I <maxlimit; I ++ ){
If (TT. Replace (/[^ \ x00-\ xFF]/g, "**"). Length <maxlimit)
Tt = tempstring. substr (0, I + 1 );
Else
Break;
}
If (TT. Replace (/[^ \ x00-\ xFF]/g, "**"). length> maxlimit)
Tt = TT. substr (0, TT. Length-1 );
Field. value = tt;
} Else {
;
}
}
</SCRIPT>

Single Row text box Control <br/>
<Input type = "text" id = "text1" name = "text1" onpropertychange = "maxlength (this, 5)"> <br/>
Multi-line text box control: <br/>
<Textarea rows = "14"
Cols = "39" id = "textarea1" name = "textarea1" onpropertychange = "maxlength (this, 15)"> </textarea> <br/>

Only numbers can be entered in the control form ....
<SCRIPT>
Function Test ()
{
If (document. A. B. value. length> 50)
{
Alert ("cannot exceed 50 characters! ");
Document. A. B. Focus ();
Return false;
}
}
</SCRIPT>
<Form name = A onsubmit = "return test ()">
<Textarea name = "B" Cols = "40" Wrap = "virtual" rows = "6"> </textarea>
<Input type = "Submit" name = "Submit" value = "check">
</Form>

Only Chinese Characters
<Input onkeyup = "value = value. Replace (/[^ \ u4e00-\ u9fa5]/g,'') ">

Only English characters are allowed
<Script language = JavaScript>
Function onlyeng ()
{
If (! (Event. keycode> = 65 & event. keycode <= 90 ))
Event. returnvalue = false;
}
</SCRIPT>

<Input onkeydown = "onlyeng ();">
<Input name = "coname" type = "text" size = "50" maxlength = "35" class = "input2" onkeyup = "value = value. replace (/[\ W]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ D]/g, '')">
Only numbers are allowed.
<Script language = JavaScript>
Function onlynum ()
{
If (! (Event. keycode> = 48 & event. keycode <= 57) | (event. keycode> = 96 & event. keycode <= 105 )))
// Consider the numeric keys on the keypad
Event. returnvalue = false;
}
</SCRIPT>

<Input onkeydown = "onlynum ();">

Only English characters and numbers are allowed
<Input onkeyup = "value = value. replace (/[\ W]/g, '')" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/[^ \ D]/g, '')">

Verify as email format
<Script language = JavaScript runat = Server>
Function isemail (stremail ){
If (stremail. search (/^ \ W + (-\ W +) | (\. \ W +) * \ @ [A-Za-z0-9] + ((\. |-) [A-Za-z0-9] + )*\. [A-Za-z0-9] + $ /)! =-1)
Return true;
Else
Alert ("oh ");
}
</SCRIPT>
<Input type = text onblur = isemail (this. Value)>

Blocked keywords (sex, fuck)-modified
<Script language = "javascript1.2">
Function Test (){
If (A. B. value. indexof ("sex") = 0) | (A. B. value. indexof ("fuck") = 0 )){
Alert ("five lectures, four beautiful three love ");
A. B. Focus ();
Return false ;}
}
</SCRIPT>
<Form name = A onsubmit = "return test ()">
<Input type = text name = B>
<Input type = "Submit" name = "Submit" value = "check">
</Form>


Only numbers can be entered in the restricted text box.
<Input onkeyup = "If (event. keycode! = 37 & event. keycode! = 39) value = value. replace (/\ D/g, '');" onbeforepaste = "clipboardData. setdata ('text', clipboardData. getdata ('text '). replace (/\ D/g, '')">

Mobile phone number :( ^ (\ D {3, 4 }-)? \ D {7, 8}) $ | (13 [0-9] {9}) | (15 [8-9] {9 })

No, you can write it according to the above description. It just takes some time.

 

Regular Expression set for verifying numbers
Verification number: ^ [0-9] * $
Verify the n-digit number: ^ \ D {n} $
Verify at least N digits: ^ \ D {n,} $
Verify M-N digits: ^ \ D {m, n} $
Verify the number starting with zero or zero: ^ (0 | [1-9] [0-9] *) $
Verify the positive number of two decimal places: ^ [0-9] + (. [0-9] {2 })? $
Verify the positive number of 1-3 decimal places: ^ [0-9] + (. [0-9] {1, 3 })? $
Verify a non-zero positive integer: ^ \ +? [1-9] [0-9] * $
Verify a non-zero negative integer: ^ \-[1-9] [0-9] * $
Verify non-negative integer (positive integer + 0) ^ \ D + $
Verify non-positive integer (negative integer + 0) ^ (-\ D +) | (0 +) $
3 characters for verification: ^. {3} $
Verify a string consisting of 26 English letters: ^ [A-Za-Z] + $
Verify a string consisting of 26 uppercase letters: ^ [A-Z] + $
Verify a string consisting of 26 lower-case letters: ^ [A-Z] + $
Verify a string consisting of digits and 26 English letters: ^ [A-Za-z0-9] + $
Verify a string consisting of digits, 26 English letters, or underscores: ^ \ W + $
Verify User Password: ^ [A-Za-Z] \ W {5, 17} $ the correct format is: it must start with a letter and be between 6 and 18 characters. It can only contain characters, numbers, and underscores.
Check whether ^ % & ',; =? $ \ "And other characters: [^ % & ',; =? $ \ X22] +
Verify Chinese characters: ^ [\ u4e00-\ u9fa5], {0,} $
Verify email address: ^ \ W + [-+.] \ W +) * @ \ W + ([-.] \ W + )*\. \ W + ([-.] \ W +) * $
Verify interneturl: ^ http: // ([\ W-] + \.) + [\ W-] + (/[\ W -./? % & =] *)? $; ^ [A-Za-Z] +: // (W + (-W +) *) (. (W + (-W + )*))*(? S *)? $
Verification phone number: ^ (\ D {3, 4} \) | \ D {3, 4 }-)? \ D {7,8} $: -- the correct format is: XXXX-XXXXXXX, XXXX-XXXXXXXX, XXX-XXXXXXX, XXX-XXXXXXXX, xxxxxxx, XXXXXXXX.
Verify the ID card number (15 or 18 digits): ^ \ D {15} | \ D {} 18 $
12 months of verification: ^ (0? [1-9] | 1 [0-2]) $ the correct format is: "01"-"09" and "1" "12"
31 days of verification for a month: ^ (0? [1-9]) | (1 | 2) [0-9]) | 30 | 31) $ the correct format is: 01, 09, 1, 31.
Integer: ^ -? \ D + $
Non-negative floating point number (Positive floating point number + 0): ^ \ D + (\. \ D + )? $
Positive floating point number ^ ([0-9] + \. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * \. [0-9] +) | ([0-9] * [1-9] [0-9] *) $
Non-Positive floating point number (negative floating point number + 0) ^ (-\ D + (\. \ D + )?) | (0 + (\. 0 + )?)) $
Negative floating point number ^ (-([0-9] + \. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * \. [0-9] +) | ([0-9] * [1-9] [0-9] *) $
Floating Point Number ^ (-? \ D +) (\. \ D + )?

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.