类 Patterns
java.lang.Object
org.beetl.core.util.Patterns
Commonly used regular expression patterns.
-
字段概要
字段修饰符和类型字段说明static final PatternRegular expression pattern to match email addresses.static final PatternRegular expression pattern to match IRIs.static final Patternstatic final Patternstatic final String已过时。Deprecated since it does not include all IRI characters defined in RFC 3987static final Patternstatic final PatternThis pattern is intended for searching for things that look like they might be phone numbers in arbitrary text, not for validating whether something is in fact a phone number.static final Pattern已过时。This API is deprecated.static final String已过时。Due to the recent profileration of gTLDs, this API is expected to become out-of-date very quickly.static final String已过时。This API is deprecated.static final PatternRegular expression pattern to match most part of RFC 3987 Internationalized URLs, aka IRIs. -
方法概要
修饰符和类型方法说明static final StringconcatGroups(Matcher matcher) Convenience method to take all of the non-null matching groups in a regex Matcher and return them as a concatenated string.static final StringdigitsAndPlusOnly(Matcher matcher) Convenience method to return only the digits and plus signs in the matching string.
-
字段详细资料
-
TOP_LEVEL_DOMAIN_STR
已过时。Due to the recent profileration of gTLDs, this API is expected to become out-of-date very quickly. Therefore it is now deprecated.Regular expression to match all IANA top-level domains. List accurate as of 2011/07/18. List taken from: http://data.iana.org/TLD/tlds-alpha-by-domain.txt This pattern is auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py- 另请参阅:
-
TOP_LEVEL_DOMAIN
已过时。This API is deprecated. SeeTOP_LEVEL_DOMAIN_STR.Regular expression pattern to match all IANA top-level domains. -
TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
已过时。This API is deprecated. SeeTOP_LEVEL_DOMAIN_STR.Regular expression to match all IANA top-level domains for WEB_URL. List accurate as of 2011/07/18. List taken from: http://data.iana.org/TLD/tlds-alpha-by-domain.txt This pattern is auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py- 另请参阅:
-
GOOD_IRI_CHAR
已过时。Deprecated since it does not include all IRI characters defined in RFC 3987Kept for backward compatibility reasons.- 另请参阅:
-
IP_ADDRESS
-
DOMAIN_NAME
-
WEB_URL
Regular expression pattern to match most part of RFC 3987 Internationalized URLs, aka IRIs. -
AUTOLINK_WEB_URL
Regular expression pattern to match IRIs. If a string starts with http(s):// the expression tries to match the URL structure with a relaxed rule for TLDs. If the string does not start with http(s):// the TLDs are expected to be one of the known TLDs. -
AUTOLINK_EMAIL_ADDRESS
Regular expression pattern to match email addresses. It excludes double quoted local parts and the special characters #&~!^`{}/=$*?| that are included in RFC5321. -
EMAIL_ADDRESS
-
PHONE
This pattern is intended for searching for things that look like they might be phone numbers in arbitrary text, not for validating whether something is in fact a phone number. It will miss many things that are legitimate phone numbers.The pattern matches the following:
- Optionally, a + sign followed immediately by one or more digits. Spaces, dots, or dashes may follow.
- Optionally, sets of digits in parentheses, separated by spaces, dots, or dashes.
- A string starting and ending with a digit, containing digits, spaces, dots, and/or dashes.
-
-
方法详细资料
-
concatGroups
Convenience method to take all of the non-null matching groups in a regex Matcher and return them as a concatenated string.- 参数:
matcher- The Matcher object from which grouped text will be extracted- 返回:
- A String comprising all of the non-null matched groups concatenated together
-
digitsAndPlusOnly
Convenience method to return only the digits and plus signs in the matching string.- 参数:
matcher- The Matcher object from which digits and plus will be extracted- 返回:
- A String comprising all of the digits and plus in the match
-