|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.mojo.versions.utils.RegexUtils
public final class RegexUtils
Utility methods to help with regex manipulation.
| Field Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REGEX_QUOTE_END
public static final String REGEX_QUOTE_START
public static final String REGEX_QUOTE_END_ESCAPED
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||