Beautiful just

xiaoxiao2021-03-06  122

Only the integer number: ^ (/ | -)? / D * $ floating point: ^ (?: / | -)? / D (?: /./ D )? $ IP address: ^ ((( 1? / D {1, 2} | 2 [0-4] / d | 25 [0-5]) /.) {3} (1 ?? / d {1, 2} | 2 [0-4 ] / D | 25 [0-5]) $ Domain Name: ^ (([AZ] | # / d ?) ([A-Z0-9-] | # / d ?) * ([A-Z0-9] # / d ?) /.) ([AZ] {2, 4}) $

Compatibility should be good

Add a few: "^ / d $" // Non-negative integer (positive integer 0) "^ [0-9] * [1-9] [0-9] * $" // 正 整 整 "^ (- / D ) | (0 )) $ "// Non-positive integer (negative integer 0)" ^ - [0-9] * [1-9] [0-9] * $ "// negative "^ -? / d $" // integer "^ / D (/./ D ) $" // Non-looted number (positive floating point 0) "^ (([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 )?) | (0 (/. 0 )?) ) $ "// Number of non-positively floating point (12)" ^ ((([([([0-9] /. [0-9] * [1-9] [0-9] *) | [0-9] * [1-9] * /. [0-9] ) | ([0-9] * [1-9] [0-9] *))) $ " / (-? / D ) ^ (-? / D )? $ "// floating point number" ^ [A-ZA-Z] $ "// String consisting of 26 English letters" ^ [AZ] $ "// String" ^ [AZ] $ "// by 26 English letters," ^ [A-ZA-Z0- 9] $ "// String" ^ / W $ "// consisting of numbers, 26 English letters or underscores" ^ [/ w -] (/. "^ [/ W -] (/. [/W-] ) *@[w-] (/.[w-] ) (// email address "^ [A-ZA-Z] : // (/ w (- / w ) *) (/.(/w (-/W ) *) * (/?/s*)? "// URL

转载请注明原文地址:https://www.9cbs.com/read-125697.html

New Post(0)