public final class RegexUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REGEX_QUOTE_END
The end of a regex literal sequence.
|
static java.lang.String |
REGEX_QUOTE_END_ESCAPED
Escape the escapes.
|
static java.lang.String |
REGEX_QUOTE_START
The start of a regex literal sequence.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.regex.Pattern |
compileWildcard(java.lang.String wildcard)
Compiles a pattern matcher using wildcard based matching.
|
static java.lang.String |
convertWildcardsToRegex(java.lang.String wildcardRule,
boolean exactMatch)
Converts a wildcard rule to a regex rule.
|
static java.lang.String |
quote(java.lang.String s)
Takes a string and returns the regex that will match that string exactly.
|
public static final java.lang.String REGEX_QUOTE_END
public static final java.lang.String REGEX_QUOTE_START
public static final java.lang.String REGEX_QUOTE_END_ESCAPED
public static java.lang.String quote(java.lang.String s)
s - The string to match.public static java.lang.String convertWildcardsToRegex(java.lang.String wildcardRule,
boolean exactMatch)
wildcardRule - the wildcard rule.exactMatch - true results in an regex that will match the entire string, while
false will match the start of the string.public static java.util.regex.Pattern compileWildcard(java.lang.String wildcard)
wildcard - The wildcards rule to match.