public class Patterns
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
AUTOLINK_EMAIL_ADDRESS
Regular expression pattern to match email addresses.
|
static java.util.regex.Pattern |
AUTOLINK_WEB_URL
Regular expression pattern to match IRIs.
|
static java.util.regex.Pattern |
DOMAIN_NAME |
static java.util.regex.Pattern |
EMAIL_ADDRESS |
static java.lang.String |
GOOD_IRI_CHAR
Deprecated.
Deprecated since it does not include all IRI characters defined in RFC 3987
|
static java.util.regex.Pattern |
IP_ADDRESS |
static java.util.regex.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 java.util.regex.Pattern |
TOP_LEVEL_DOMAIN
Deprecated.
This API is deprecated. See
TOP_LEVEL_DOMAIN_STR . |
static java.lang.String |
TOP_LEVEL_DOMAIN_STR
Deprecated.
Due to the recent profileration of gTLDs, this API is
expected to become out-of-date very quickly. Therefore it is now
deprecated.
|
static java.lang.String |
TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
Deprecated.
This API is deprecated. See
TOP_LEVEL_DOMAIN_STR . |
static java.util.regex.Pattern |
WEB_URL
Regular expression pattern to match most part of RFC 3987
Internationalized URLs, aka IRIs.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
concatGroups(java.util.regex.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 java.lang.String |
digitsAndPlusOnly(java.util.regex.Matcher matcher)
Convenience method to return only the digits and plus signs
in the matching string.
|
@Deprecated public static final java.lang.String TOP_LEVEL_DOMAIN_STR
@Deprecated public static final java.util.regex.Pattern TOP_LEVEL_DOMAIN
TOP_LEVEL_DOMAIN_STR
.@Deprecated public static final java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
TOP_LEVEL_DOMAIN_STR
.@Deprecated public static final java.lang.String GOOD_IRI_CHAR
public static final java.util.regex.Pattern IP_ADDRESS
public static final java.util.regex.Pattern DOMAIN_NAME
public static final java.util.regex.Pattern WEB_URL
public static final java.util.regex.Pattern AUTOLINK_WEB_URL
public static final java.util.regex.Pattern AUTOLINK_EMAIL_ADDRESS
public static final java.util.regex.Pattern EMAIL_ADDRESS
public static final java.util.regex.Pattern PHONE
The pattern matches the following:
public static final java.lang.String concatGroups(java.util.regex.Matcher matcher)
matcher
- The Matcher object from which grouped text will
be extractedpublic static final java.lang.String digitsAndPlusOnly(java.util.regex.Matcher matcher)
matcher
- The Matcher object from which digits and plus will
be extractedCopyright © 2021. All Rights Reserved.