构造器和说明 |
---|
PatternKit() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
isBirthday(String birthday)
Verification date (date)
|
static boolean |
isBlankSpace(String blankSpace)
verify blank character
|
static boolean |
isChinese(String chinese)
verify the Chinese
|
static boolean |
isDecimals(String decimals)
Verify integer and floating point Numbers (positive and negative integers and positive and negative floating point Numbers)
|
static boolean |
isDigit(String digit)
Verification of integers (positive and negative integers)
|
static boolean |
isEmail(String email)
Validation Email
|
static boolean |
isIdCard15(String idCard)
Verify the id card number
|
static boolean |
isIdCard18(String idCard)
Verify the id card number
|
static boolean |
isImage(String suffix)
Verify that the suffix is a picture format.
|
static boolean |
isIpAddress(String ipAddress)
Match the IP address (simple match, format, such as: 192.168.1.1, 127.0.0.1, no matching IP segment size)
|
static boolean |
isMatch(String regex,
CharSequence input)
Determines whether the regular is matched.
|
static boolean |
isMobile(String mobile)
Verify phone number (support international format, +86135 XXXX...
|
static boolean |
isNumber(String str)
The test is a number.
|
static boolean |
isPhone(String phone)
Verify the fixed phone number.
|
static boolean |
isPostcode(String postcode)
Match Chinese postal code.
|
static boolean |
isRealName(String chinese)
Verify the Chinese alphanumeric space.
|
static boolean |
isURL(String url)
Verify URL address
|
public static boolean isEmail(String email)
email
- email format:[email protected],[email protected],xxx representative email service provider.public static boolean isIdCard18(String idCard)
idCard
- the resident identity card number is 18, and the last one may be Numbers or letters.public static boolean isIdCard15(String idCard)
idCard
- the resident identity card number is 15, and the last one may be Numbers or letters.public static boolean isImage(String suffix)
suffix
- filename suffixpublic static boolean isMobile(String mobile)
mobile
- Regular: mobile phone number (exact)
Mobile:134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188
Unicom:130、131、132、145、155、156、171、175、176、185、186
Chinanet:133、153、173、177、180、181、189
Globalstar:1349
VNO:170
public static boolean isPhone(String phone)
phone
- Telephone number, format: country (area) telephone code + area code (city code) + phone number, for example:+8602085588447
Country (region) code: Country (region) code that identifies the country (region) of telephone number. It contains one or more digits from 0 to 9, the number is followed by a space - separated country (region) code.
Area code (city code): this may include one or more digits from 0 to 9, area or city code in parentheses.—— for countries that do not use regional or urban code, this component is omitted.
phone number:this contains one or more digits from 0 to 9.
public static boolean isDigit(String digit)
digit
- One or more integers between 0 and 9.public static boolean isDecimals(String decimals)
decimals
- one or more float point Numbers between 0-9, such as: 1.23,233.30public static boolean isBlankSpace(String blankSpace)
blankSpace
- Blank characters, including: space、\t、\n、\r、\f、\x0Bpublic static boolean isChinese(String chinese)
chinese
- chinese characterpublic static boolean isRealName(String chinese)
chinese
- chinese characterpublic static boolean isNumber(String str)
str
- the string to match.public static boolean isBirthday(String birthday)
birthday
- date format: "1992-09-03" or "1992.09.03"public static boolean isURL(String url)
url
- format:http://biezhi.me:80 ftp://192.168.2.12public static boolean isPostcode(String postcode)
postcode
- postal codepublic static boolean isIpAddress(String ipAddress)
ipAddress
- IPv4 standard addresstrue
: matchingfalse
: mismatchingpublic static boolean isMatch(String regex, CharSequence input)
regex
- regular expressioninput
- the string to match.true
: matchingfalse
: mismatchingCopyright © 2018. All rights reserved.