|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.craftforge.essential.controller.utils.RegExUtils
public class RegExUtils
Utilities for regular expression actions.
| Field Summary | |
|---|---|
static String |
DEFAULT_REG_EX
The regular expression used for default resource path variables |
static Pattern |
FIND_ALL_LITERALS
Finds all literals and numbers |
static Pattern |
FIND_ALL_NONE_LITERALS
Finds all none literals and numbers |
static Pattern |
FIND_CHARSET
Finds all charset=XYZ notations regardless of whitespace characters and provides a group for XYZ |
static Pattern |
FIND_COLON
Finds colons |
static Pattern |
FIND_CURLY_BRACKETS
Finds all opening and closing curly brackets |
static Pattern |
FIND_ENCLOSED_BY_CURLY_BRACKETS
Finds all characters enclosed by curly brackets including the brackets |
static Pattern |
FIND_HEADER
Finds all characters enclosed by square brackets starting with 'header:' and provides a group for the characters after header |
static Pattern |
FIND_NO_EQUAL_CONTAINED
Finds a character sequence that does not contain an equal character. |
static Pattern |
FIND_REG_EX_OPERATORS
Finds regular expression characters |
static Pattern |
FIND_SEMI_COLON
Finds semi colons |
static Pattern |
FIND_SLASH
Finds slashes |
| Constructor Summary | |
|---|---|
RegExUtils()
|
|
| Method Summary | |
|---|---|
static String |
getParamNameFromPathPart(String pathPart)
Gets the param name from a (virtual) path part assuming it to not be static. |
static String |
getParamNameFromPathPart(String pathPart,
boolean withCurlyBrackets)
Gets the param name from a (virtual) path part assuming it to not be static. |
static String |
getRegExFromPathPart(String pathPart)
Gets the regular expression encoded in a (virtual) path part. |
static String[] |
getValuesFromPathPart(String pathPart)
Gets the values from a (real) path part assuming the part to be variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_REG_EX
public static final Pattern FIND_REG_EX_OPERATORS
public static final Pattern FIND_SLASH
public static final Pattern FIND_SEMI_COLON
public static final Pattern FIND_COLON
public static final Pattern FIND_ALL_LITERALS
public static final Pattern FIND_ALL_NONE_LITERALS
public static final Pattern FIND_CURLY_BRACKETS
public static final Pattern FIND_ENCLOSED_BY_CURLY_BRACKETS
public static final Pattern FIND_HEADER
public static final Pattern FIND_CHARSET
public static final Pattern FIND_NO_EQUAL_CONTAINED
| Constructor Detail |
|---|
public RegExUtils()
| Method Detail |
|---|
public static String getRegExFromPathPart(String pathPart)
Gets the regular expression encoded in a (virtual) path part.
The following cases are handled by this method:
pathPart - The path part
public static String[] getValuesFromPathPart(String pathPart)
Gets the values from a (real) path part assuming the part to be variable. Multiple values are expected to be semi-colon separated.
Examples:
pathPart - The path part
public static String getParamNameFromPathPart(String pathPart,
boolean withCurlyBrackets)
Gets the param name from a (virtual) path part assuming it to not be static. Depending on the flag, the parameter name is returned in curly brackets or without.
pathPart - The path partwithCurlyBrackets - Whether the result has curly brackets or not
public static String getParamNameFromPathPart(String pathPart)
pathPart - The path part
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||