public class Patterns extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static Pattern |
AUTOLINK_EMAIL_ADDRESS
Regular expression pattern to match email addresses.
|
static Pattern |
AUTOLINK_WEB_URL
Regular expression pattern to match IRIs.
|
static Pattern |
DOMAIN_NAME |
static Pattern |
EMAIL_ADDRESS |
static String |
GOOD_IRI_CHAR
已过时。
Deprecated since it does not include all IRI characters defined in RFC 3987
|
static Pattern |
IP_ADDRESS |
static Pattern |
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.
|
static Pattern |
TOP_LEVEL_DOMAIN
已过时。
This API is deprecated. See
TOP_LEVEL_DOMAIN_STR. |
static 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.
|
static String |
TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
已过时。
This API is deprecated. See
TOP_LEVEL_DOMAIN_STR. |
static Pattern |
WEB_URL
Regular expression pattern to match most part of RFC 3987
Internationalized URLs, aka IRIs.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
concatGroups(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 String |
digitsAndPlusOnly(Matcher matcher)
Convenience method to return only the digits and plus signs
in the matching string.
|
@Deprecated public static final String TOP_LEVEL_DOMAIN_STR
@Deprecated public static final Pattern TOP_LEVEL_DOMAIN
TOP_LEVEL_DOMAIN_STR.@Deprecated public static final String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
TOP_LEVEL_DOMAIN_STR.@Deprecated public static final String GOOD_IRI_CHAR
public static final Pattern IP_ADDRESS
public static final Pattern DOMAIN_NAME
public static final Pattern WEB_URL
public static final Pattern AUTOLINK_WEB_URL
public static final Pattern AUTOLINK_EMAIL_ADDRESS
public static final Pattern EMAIL_ADDRESS
public static final Pattern PHONE
The pattern matches the following:
public static final String concatGroups(Matcher matcher)
matcher - The Matcher object from which grouped text will
be extractedpublic static final String digitsAndPlusOnly(Matcher matcher)
matcher - The Matcher object from which digits and plus will
be extractedCopyright © 2022. All rights reserved.