com.twitter.twittertext

## Class Regex

- java.lang.Object
- - com.twitter.twittertext.Regex

-     public class Regex
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.regex.Pattern` | `AT_SIGNS`
    `static java.util.regex.Pattern` | `INVALID_CHARACTERS_PATTERN`
    `static java.util.regex.Pattern` | `INVALID_HASHTAG_MATCH_END`
    `static java.util.regex.Pattern` | `INVALID_MENTION_MATCH_END`
    `static java.util.regex.Pattern` | `INVALID_URL_WITHOUT_PROTOCOL_MATCH_BEGIN`
    `static java.util.regex.Pattern` | `RTL_CHARACTERS`
    `static java.util.regex.Pattern` | `VALID_CASHTAG`
    `static int` | `VALID_CASHTAG_GROUP_BEFORE`
    `static int` | `VALID_CASHTAG_GROUP_CASHTAG`
    `static int` | `VALID_CASHTAG_GROUP_DOLLAR`
    `static java.util.regex.Pattern` | `VALID_DOMAIN`
    `static java.util.regex.Pattern` | `VALID_HASHTAG`
    `static int` | `VALID_HASHTAG_GROUP_BEFORE`
    `static int` | `VALID_HASHTAG_GROUP_HASH`
    `static int` | `VALID_HASHTAG_GROUP_TAG`
    `static java.util.regex.Pattern` | `VALID_MENTION_OR_LIST`
    `static int` | `VALID_MENTION_OR_LIST_GROUP_AT`
    `static int` | `VALID_MENTION_OR_LIST_GROUP_BEFORE`
    `static int` | `VALID_MENTION_OR_LIST_GROUP_LIST`
    `static int` | `VALID_MENTION_OR_LIST_GROUP_USERNAME`
    `static java.util.regex.Pattern` | `VALID_REPLY`
    `static int` | `VALID_REPLY_GROUP_USERNAME`
    `static java.util.regex.Pattern` | `VALID_TCO_URL`
    `static java.util.regex.Pattern` | `VALID_URL` Regex to extract URL (it also includes the text preceding the url).
    `static int` | `VALID_URL_GROUP_ALL`
    `static int` | `VALID_URL_GROUP_BEFORE`
    `static int` | `VALID_URL_GROUP_DOMAIN`
    `static int` | `VALID_URL_GROUP_PATH`
    `static int` | `VALID_URL_GROUP_PORT`
    `static int` | `VALID_URL_GROUP_PROTOCOL`
    `static int` | `VALID_URL_GROUP_QUERY_STRING`
    `static int` | `VALID_URL_GROUP_URL`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Regex()`

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INVALID_CHARACTERS_PATTERN

          public static final java.util.regex.Pattern INVALID_CHARACTERS_PATTERN

    - #### VALID_HASHTAG

          public static final java.util.regex.Pattern VALID_HASHTAG

    - #### VALID_HASHTAG_GROUP_BEFORE

          public static final int VALID_HASHTAG_GROUP_BEFORE

      See Also:
        Constant Field Values

    - #### VALID_HASHTAG_GROUP_HASH

          public static final int VALID_HASHTAG_GROUP_HASH

      See Also:
        Constant Field Values

    - #### VALID_HASHTAG_GROUP_TAG

          public static final int VALID_HASHTAG_GROUP_TAG

      See Also:
        Constant Field Values

    - #### INVALID_HASHTAG_MATCH_END

          public static final java.util.regex.Pattern INVALID_HASHTAG_MATCH_END

    - #### RTL_CHARACTERS

          public static final java.util.regex.Pattern RTL_CHARACTERS

    - #### AT_SIGNS

          public static final java.util.regex.Pattern AT_SIGNS

    - #### VALID_MENTION_OR_LIST

          public static final java.util.regex.Pattern VALID_MENTION_OR_LIST

    - #### VALID_MENTION_OR_LIST_GROUP_BEFORE

          public static final int VALID_MENTION_OR_LIST_GROUP_BEFORE

      See Also:
        Constant Field Values

    - #### VALID_MENTION_OR_LIST_GROUP_AT

          public static final int VALID_MENTION_OR_LIST_GROUP_AT

      See Also:
        Constant Field Values

    - #### VALID_MENTION_OR_LIST_GROUP_USERNAME

          public static final int VALID_MENTION_OR_LIST_GROUP_USERNAME

      See Also:
        Constant Field Values

    - #### VALID_MENTION_OR_LIST_GROUP_LIST

          public static final int VALID_MENTION_OR_LIST_GROUP_LIST

      See Also:
        Constant Field Values

    - #### VALID_REPLY

          public static final java.util.regex.Pattern VALID_REPLY

    - #### VALID_REPLY_GROUP_USERNAME

          public static final int VALID_REPLY_GROUP_USERNAME

      See Also:
        Constant Field Values

    - #### INVALID_MENTION_MATCH_END

          public static final java.util.regex.Pattern INVALID_MENTION_MATCH_END

    - #### VALID_URL

          public static final java.util.regex.Pattern VALID_URL

      Regex to extract URL (it also includes the text preceding the url). This regex does not reflect its name and `VALID_URL_GROUP_URL` match should be checked in order to match a valid url. This is not ideal, but the behavior is being kept to ensure backwards compatibility. Ideally this regex should be implemented with a negative lookbehind as opposed to a negated character class but lack of JS support increases maint overhead if the logic is different by platform.

    - #### VALID_URL_GROUP_ALL

          public static final int VALID_URL_GROUP_ALL

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_BEFORE

          public static final int VALID_URL_GROUP_BEFORE

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_URL

          public static final int VALID_URL_GROUP_URL

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_PROTOCOL

          public static final int VALID_URL_GROUP_PROTOCOL

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_DOMAIN

          public static final int VALID_URL_GROUP_DOMAIN

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_PORT

          public static final int VALID_URL_GROUP_PORT

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_PATH

          public static final int VALID_URL_GROUP_PATH

      See Also:
        Constant Field Values

    - #### VALID_URL_GROUP_QUERY_STRING

          public static final int VALID_URL_GROUP_QUERY_STRING

      See Also:
        Constant Field Values

    - #### VALID_TCO_URL

          public static final java.util.regex.Pattern VALID_TCO_URL

    - #### INVALID_URL_WITHOUT_PROTOCOL_MATCH_BEGIN

          public static final java.util.regex.Pattern INVALID_URL_WITHOUT_PROTOCOL_MATCH_BEGIN

    - #### VALID_CASHTAG

          public static final java.util.regex.Pattern VALID_CASHTAG

    - #### VALID_CASHTAG_GROUP_BEFORE

          public static final int VALID_CASHTAG_GROUP_BEFORE

      See Also:
        Constant Field Values

    - #### VALID_CASHTAG_GROUP_DOLLAR

          public static final int VALID_CASHTAG_GROUP_DOLLAR

      See Also:
        Constant Field Values

    - #### VALID_CASHTAG_GROUP_CASHTAG

          public static final int VALID_CASHTAG_GROUP_CASHTAG

      See Also:
        Constant Field Values

    - #### VALID_DOMAIN

          public static final java.util.regex.Pattern VALID_DOMAIN

  - ### Constructor Detail

    - #### Regex

          protected Regex()