类 Patterns

java.lang.Object
org.beetl.core.util.Patterns

public class Patterns extends Object
Commonly used regular expression patterns.
  • 字段详细资料

    • TOP_LEVEL_DOMAIN_STR

      @Deprecated public static final 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

      @Deprecated public static final Pattern TOP_LEVEL_DOMAIN
      已过时。
      This API is deprecated. See TOP_LEVEL_DOMAIN_STR.
      Regular expression pattern to match all IANA top-level domains.
    • TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL

      @Deprecated public static final String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
      已过时。
      This API is deprecated. See TOP_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 public static final String GOOD_IRI_CHAR
      已过时。
      Deprecated since it does not include all IRI characters defined in RFC 3987
      Kept for backward compatibility reasons.
      另请参阅:
    • IP_ADDRESS

      public static final Pattern IP_ADDRESS
    • DOMAIN_NAME

      public static final Pattern DOMAIN_NAME
    • WEB_URL

      public static final Pattern WEB_URL
      Regular expression pattern to match most part of RFC 3987 Internationalized URLs, aka IRIs.
    • EMAIL_ADDRESS

      public static final Pattern EMAIL_ADDRESS
    • PHONE

      public static final 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. 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

      public static final 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.
      参数:
      matcher - The Matcher object from which grouped text will be extracted
      返回:
      A String comprising all of the non-null matched groups concatenated together
    • digitsAndPlusOnly

      public static final String digitsAndPlusOnly(Matcher matcher)
      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