public final class RegexUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
REGEX_QUOTE_END
The end of a regex literal sequence.
|
static String |
REGEX_QUOTE_END_ESCAPED
Escape the escapes.
|
static String |
REGEX_QUOTE_START
The start of a regex literal sequence.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
convertWildcardsToRegex(String wildcardRule,
boolean exactMatch)
Converts a wildcard rule to a regex rule.
|
static int |
getWildcardScore(String wildcardRule) |
static String |
quote(String s)
Takes a string and returns the regex that will match that string exactly.
|
public static final String REGEX_QUOTE_END
public static final String REGEX_QUOTE_START
public static final String REGEX_QUOTE_END_ESCAPED
public static String quote(String s)
s - The string to match.public static int getWildcardScore(String wildcardRule)
public static String convertWildcardsToRegex(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.Copyright © 2008-2014. All Rights Reserved.