"^ \ 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 consisting of 26 English letters
" ^ [A-Z] + $ "// a string consisting of 26 uppercase letters
" ^ [A-Z] + $ "// a string consisting of 26 lowercase letters
"^ [A-Za-z0-9] + $" // string consisting of digits and 26 English letters
"^ \ W + $" // consists of digits and 26 English letters or a string consisting of underscores
"^ [\ W-] + (\. [\ W-] +) * @ [\ W-] + (\. [\ W-] +) + $ "// email address
" ^ [A-Za-Z] +: // (\ W + (-\ W +) *)(\. (\ W + (-\ W + )*))*(\? \ S *)? $ "// URL
/^ 13 \ D {9} $/GI mobile phone number Regular Expression
Public static bool isvalidinclueno (string inclueno)
{
Const string regpattern = @ "^ (130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139) \ D {8} $ ";
Return RegEx. ismatch (regioneno, regpattern );
}
Regular Expression -- verify the mobile phone number
13 [0-9] {9}
When the mobile phone number is 86 or + 86
^ (\ + 86) | (86 ))? (13) \ D {9} $
Verify the phone number and phone number at the same time
(^ (\ D {3, 4 }-)? \ D {7, 8}) $ | (13 [0-9] {9 })
Extract the network link from the information:
(H | H) (R | r) (E | E) (F | f) * = * ('| ")? (\ W | \/| \.) + ('| "| * |> )?
The email address in the extracted information:
\ W + ([-+.] \ W +) * @ \ W + ([-.] \ W + )*\. \ W + ([-.] \ W + )*
Extract the image link from the information:
(S | S) (R | r) (C | C) * = * ('| ")? (\ W | \/| \.) + ('| "| * |> )?
Extract the IP address from the information:
(\ D +) \. (\ D +)
Extract the Chinese mobile phone number from the information:
(86) * 0*13 \ D {9}
Chinese landline number extracted from the information:
(\ D {3, 4} \) | \ D {3, 4}-| \ s )? \ D {8}
Extract Chinese phone numbers (including mobile and landlines) from the Information ):
(\ D {3, 4} \) | \ D {3, 4}-| \ s )? \ D {7, 14}
Extract the Chinese postal code from the information:
[1-9] {1} (\ D +) {5}
The Chinese ID card number in the extracted information:
\ D {18} | \ D {15}
Extract an integer from the information:
\ D +
Extract the floating point number (decimal number) in the information ):
(-? \ D *)\.? \ D +
Extract any number from the information:
(-? \ D *) (\. \ D + )?
Extract Chinese strings from information:
[\ U4e00-\ u9fa5] *
Extract double-byte strings (Chinese characters) from the Information ):
[^ \ X00-\ xFF] *