java.util.regex.Pattern
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Pattern | VERSION_SPLIT_PATTERN
The pattern to split version strings. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Pattern | Returns: the given regular expression compiled into a pattern with thePattern#DOTALL flag.The expression to be compiled. regex)Compiles the given regular expression into a pattern with the |
| public static Matcher | Returns: A new matcher for this pattern.The expression to be compiled. regex, final CharSequence The character sequence to be matched. text)Compiles the given regular expression into a pattern with the |
| public static Matcher | Returns: A new matcher for this pattern.The expression to be compiled. regex, final String The character sequence to be matched. text)
Deprecated
Use
dotAllMatcher(String, CharSequence).
Compiles the given regular expression into a pattern with the |
| public static String | Returns: the text with any removes processed,null if null String input.text to remove from, may be null. text, final Pattern the regular expression to which this string is to be matched. regex)Removes each substring of the text String that matches the given regular expression pattern. |
| public static String | Returns: the text with any removes processed,null if null String input.text to remove from, may be null. text, final Pattern the regular expression to which this string is to be matched regex)
Deprecated
Use
removeAll(CharSequence, Pattern).
Removes each substring of the text String that matches the given regular expression pattern. |
| public static String | |
| public static String | Returns: the text with the first replacement processed,null if null String input.text to remove from, may be null. text, final Pattern the regular expression pattern to which this string is to be matched. regex)Removes the first substring of the text string that matches the given regular expression pattern. |
| public static String | Returns: the text with the first replacement processed,null if null String input.text to remove from, may be null. text, final Pattern the regular expression pattern to which this string is to be matched. regex)
Deprecated
Use
removeFirst(CharSequence, Pattern).
Removes the first substring of the text string that matches the given regular expression pattern. |
| public static String | Returns: the text with the first replacement processed,null if null String input.text to remove from, may be null. text, final String the regular expression to which this string is to be matched. regex)Removes the first substring of the text string that matches the given regular expression. |
| public static String | Returns: The resultingString.the source string. text, final String the regular expression to which this string is to be matched. regex)Removes each substring of the source String that matches the given regular expression using the DOTALL option. |
| public static String | Returns: The resultingString.the source string. text, final String the regular expression to which this string is to be matched. regex)
Deprecated
Use
removePattern(CharSequence, String).
Removes each substring of the source String that matches the given regular expression using the DOTALL option. |
| public static String | Returns: the text with any replacements processed,null if null String input.text to search and replace in, may be null. text, final Pattern the regular expression pattern to which this string is to be matched. regex, final String the string to be substituted for each match. replacement)Replaces each substring of the text String that matches the given regular expression pattern with the given replacement. |
| public static String | Returns: the text with any replacements processed,null if null String input.text to search and replace in, may be null. text, final Pattern the regular expression pattern to which this string is to be matched. regex, final String the string to be substituted for each match. replacement)
Deprecated
Use
replaceAll(CharSequence, Pattern, String).
Replaces each substring of the text String that matches the given regular expression pattern with the given replacement. |
| public static String | Returns: the text with any replacements processed,null if null String input.text to search and replace in, may be null. text, final String the regular expression to which this string is to be matched. regex, final String the string to be substituted for each match. replacement)Replaces each substring of the text String that matches the given regular expression with the given replacement. |
| public static String | Returns: the text with the first replacement processed,null if null String input.text to search and replace in, may be null. text, final Pattern the regular expression pattern to which this string is to be matched. regex, final String the string to be substituted for the first match replacement)Replaces the first substring of the text string that matches the given regular expression pattern with the given replacement. |
| public static String | Returns: the text with the first replacement processed,null if null String input.text to search and replace in, may be null. text, final Pattern the regular expression pattern to which this string is to be matched. regex, final String the string to be substituted for the first match. replacement)
Deprecated
Use
replaceFirst(CharSequence, Pattern, String).
Replaces the first substring of the text string that matches the given regular expression pattern with the given replacement. |
| public static String | Returns: the text with the first replacement processed,null if null String input.text to search and replace in, may be null. text, final String the regular expression to which this string is to be matched. regex, final String the string to be substituted for the first match. replacement)Replaces the first substring of the text string that matches the given regular expression with the given replacement. |
| public static String | Returns: The resultingString.the source string. text, final String the regular expression to which this string is to be matched. regex, final String the string to be substituted for each match. replacement)Replaces each substring of the source String that matches the given regular expression with the given
replacement using the |
| public static String | Returns: The resultingString.the source string. text, final String the regular expression to which this string is to be matched. regex, final String the string to be substituted for each match. replacement)
Deprecated
Use
replacePattern(CharSequence, String, String).
Replaces each substring of the source String that matches the given regular expression with the given
replacement using the |
| private static String |
| VERSION_SPLIT_PATTERN | back to summary |
|---|---|
| pack-priv static final Pattern VERSION_SPLIT_PATTERN The pattern to split version strings. | |
| RegExUtils | back to summary |
|---|---|
| public RegExUtils()
Deprecated TODO Make private in 4.0. Make private in 4.0.
| |
| dotAll | back to summary |
|---|---|
| public static Pattern dotAll(final String regex) Compiles the given regular expression into a pattern with the
| |
| dotAllMatcher | back to summary |
|---|---|
| public static Matcher dotAllMatcher(final String regex, final CharSequence text) Compiles the given regular expression into a pattern with the
| |
| dotAllMatcher | back to summary |
|---|---|
| public static Matcher dotAllMatcher(final String regex, final String text)
Deprecated Compiles the given regular expression into a pattern with the
| |
| removeAll | back to summary |
|---|---|
| public static String removeAll(final CharSequence text, final Pattern regex) Removes each substring of the text String that matches the given regular expression pattern.
This method is a
A
| |
| removeAll | back to summary |
|---|---|
| public static String removeAll(final String text, final Pattern regex)
Deprecated Removes each substring of the text String that matches the given regular expression pattern.
This method is a
A
| |
| removeAll | back to summary |
|---|---|
| public static String removeAll(final String text, final String regex) Removes each substring of the text String that matches the given regular expression.
This method is a
A Unlike in the
| |
| removeFirst | back to summary |
|---|---|
| public static String removeFirst(final CharSequence text, final Pattern regex) Removes the first substring of the text string that matches the given regular expression pattern.
This method is a
A
| |
| removeFirst | back to summary |
|---|---|
| public static String removeFirst(final String text, final Pattern regex)
Deprecated Removes the first substring of the text string that matches the given regular expression pattern.
This method is a
A
| |
| removeFirst | back to summary |
|---|---|
| public static String removeFirst(final String text, final String regex) Removes the first substring of the text string that matches the given regular expression.
This method is a
A The
| |
| removePattern | back to summary |
|---|---|
| public static String removePattern(final CharSequence text, final String regex) Removes each substring of the source String that matches the given regular expression using the DOTALL option.
This call is a
A
| |
| removePattern | back to summary |
|---|---|
| public static String removePattern(final String text, final String regex)
Deprecated Removes each substring of the source String that matches the given regular expression using the DOTALL option.
This call is a
A
| |
| replaceAll | back to summary |
|---|---|
| public static String replaceAll(final CharSequence text, final Pattern regex, final String replacement) Replaces each substring of the text String that matches the given regular expression pattern with the given replacement.
This method is a
A
| |
| replaceAll | back to summary |
|---|---|
| public static String replaceAll(final String text, final Pattern regex, final String replacement)
Deprecated Replaces each substring of the text String that matches the given regular expression pattern with the given replacement.
This method is a
A
| |
| replaceAll | back to summary |
|---|---|
| public static String replaceAll(final String text, final String regex, final String replacement) Replaces each substring of the text String that matches the given regular expression
with the given replacement.
This method is a
A Unlike in the
| |
| replaceFirst | back to summary |
|---|---|
| public static String replaceFirst(final CharSequence text, final Pattern regex, final String replacement) Replaces the first substring of the text string that matches the given regular expression pattern
with the given replacement.
This method is a
A
| |
| replaceFirst | back to summary |
|---|---|
| public static String replaceFirst(final String text, final Pattern regex, final String replacement)
Deprecated Replaces the first substring of the text string that matches the given regular expression pattern
with the given replacement.
This method is a
A
| |
| replaceFirst | back to summary |
|---|---|
| public static String replaceFirst(final String text, final String regex, final String replacement) Replaces the first substring of the text string that matches the given regular expression
with the given replacement.
This method is a
A The
| |
| replacePattern | back to summary |
|---|---|
| public static String replacePattern(final CharSequence text, final String regex, final String replacement) Replaces each substring of the source String that matches the given regular expression with the given
replacement using the
A
| |
| replacePattern | back to summary |
|---|---|
| public static String replacePattern(final String text, final String regex, final String replacement)
Deprecated Replaces each substring of the source String that matches the given regular expression with the given
replacement using the
A
| |
| toStringOrNull | back to summary |
|---|---|
| private static String toStringOrNull(final CharSequence text) | |