17 regular expressions

Time：2022-4-27

“^ \ D + \$” / / non negative integer (positive integer + 0)
“^ [0-9] * [1-9] [0-9] * \$” / / positive integer
“^ (- \ D +)| (0 +) \$” / / non positive integer (negative integer + 0)
“^ – [0-9] * [1-9] [0-9] * \$” / / negative integer
“^ -? \ D + \$” / / integer
“^ \ D + (\. \ D +)? \$” / / non negative floating point number (positive floating point number + 0)
“^ (([0-9] + \. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * \. [0-9] +) | ([0-9] * [1-9] [0-9] *) \$” / / positive floating point number
“^ (- \ D + (\. \ D +)?) | (0 + (\. 0 +)?) \$” / / non positive floating-point number (negative floating-point number + 0)
“^ (- (([0-9] + \. [0-9] * [1-9] [0-9] *) | ([0-9] * [1-9] [0-9] * \. [0-9] +) | ([0-9] * [1-9] [0-9] *)) \$” / / negative floating point number
“^ (-? \ D +) (\. \ D +)? \$” / / floating point number
“^ [a-za-z] + \$” / / a string of 26 English letters
“^ [A-Z] + \$” / / a string composed of 26 uppercase letters
“^ [A-Z] + \$” / / a string composed of 26 lowercase letters
“^ [a-za-z0-9] + \$” / / a string consisting of numbers and 26 English letters
“^ \ W + \$” / / a string consisting of numbers, 26 English letters or underscores
“^ [\ W -] + (\. [\ W -] +) * @ [\ W -] + (\. [\ W -] +) + \$” / / email address
“^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?\$”　　//url

JS generate guid method

JS generate guid method https://blog.csdn.net/Alive_tree/article/details/87942348 Globally unique identification(GUID) is an algorithm generatedBinaryCount Reg128 bitsNumber ofidentifier , GUID is mainly used in networks or systems with multiple nodes and computers. Ideally, any computational geometry computer cluster will not generate two identical guids, and the total number of guids is2^128In theory, it is difficult to make two […]