"^\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]+)|([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]+)|([0-9]*[1-9][0-9]*)))$"//Negative floating point
number
"^(-?\d+)(\.\d+)?$"//Floating point number
"^[A-Za-z]+$"//A string composed of 26 English letters
"^[A-Z]+$"//A string composed of 26 English letters capitalization
"^[a-z]+$"//A string composed of 26 English letters lowercase
"^[A-Za-z0-9]+$"//A string composed of numbers and 26 English letters
"^\w+$"//A string composed of numbers, 26 English letters or 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 IsValidMobileNo(string MobileNo)
{
const string regPattern = @"^(130|131|132|133|134|135|136|137|138|139)\d{8}$";
return (MobileNo, regPattern);
}
Regular expression-Verify mobile phone number: 13[0-9]{9}
Implement the situation where the mobile phone number is 86 or +86:^((\+86)|(86))?(13)\d{9}$
Verify phone number and mobile phone number simultaneously: (^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})
Network links in extracting information: (h|H)(r|R)(e|E)(f|F) *= *('|")?(\w|\\\|/|\.)+('|"| *|>)?
The email address in the extracted information: \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Image links in extracting information: (s|S)(r|R)(c|C) *= *('|")?(\w|\\\|/|\.)+('|"| *|>)?
The IP address in the extracted information: (\d+)\.(\d+)\.(\d+)\.(\d+)
Chinese mobile phone number in the extracted information: (86)*0*13\d{9}
Chinese fixed phone number extracted from the information: (\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}
Extract Chinese phone numbers (including mobile and landline phones) in the information: (\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}
The Chinese postal code in the extracted information: [1-9]{1}(\d+){5}
The Chinese ID number in the extracted information:\d{18}|\d{15}
Extract integers in the information: \d+
Extract floating point numbers (i.e. decimals) in the information: (-?\d*)\.?\d+
Extract any number in the information : (-?\d*)(\.\d+)?
Extract Chinese strings in the information: [\u4e00-\u9fa5]*
Extract double-byte string in information (Chinese characters): [^\x00-\xff]*
"^[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]+)|([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]+)|([0-9]*[1-9][0-9]*)))$"//Negative floating point
number
"^(-?\d+)(\.\d+)?$"//Floating point number
"^[A-Za-z]+$"//A string composed of 26 English letters
"^[A-Z]+$"//A string composed of 26 English letters capitalization
"^[a-z]+$"//A string composed of 26 English letters lowercase
"^[A-Za-z0-9]+$"//A string composed of numbers and 26 English letters
"^\w+$"//A string composed of numbers, 26 English letters or 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 IsValidMobileNo(string MobileNo)
{
const string regPattern = @"^(130|131|132|133|134|135|136|137|138|139)\d{8}$";
return (MobileNo, regPattern);
}
Regular expression-Verify mobile phone number: 13[0-9]{9}
Implement the situation where the mobile phone number is 86 or +86:^((\+86)|(86))?(13)\d{9}$
Verify phone number and mobile phone number simultaneously: (^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})
Network links in extracting information: (h|H)(r|R)(e|E)(f|F) *= *('|")?(\w|\\\|/|\.)+('|"| *|>)?
The email address in the extracted information: \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Image links in extracting information: (s|S)(r|R)(c|C) *= *('|")?(\w|\\\|/|\.)+('|"| *|>)?
The IP address in the extracted information: (\d+)\.(\d+)\.(\d+)\.(\d+)
Chinese mobile phone number in the extracted information: (86)*0*13\d{9}
Chinese fixed phone number extracted from the information: (\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}
Extract Chinese phone numbers (including mobile and landline phones) in the information: (\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}
The Chinese postal code in the extracted information: [1-9]{1}(\d+){5}
The Chinese ID number in the extracted information:\d{18}|\d{15}
Extract integers in the information: \d+
Extract floating point numbers (i.e. decimals) in the information: (-?\d*)\.?\d+
Extract any number in the information : (-?\d*)(\.\d+)?
Extract Chinese strings in the information: [\u4e00-\u9fa5]*
Extract double-byte string in information (Chinese characters): [^\x00-\xff]*