public class PatternUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
NOTHING |
Constructor and Description |
---|
PatternUtil() |
Modifier and Type | Method and Description |
---|---|
static java.util.regex.Pattern |
compileSafe(java.lang.String pattern,
java.util.regex.Pattern def) |
static java.lang.String |
convertToRegex(java.lang.String mask) |
static java.util.regex.Pattern |
fromMask(java.lang.String mask) |
static java.lang.String |
getFirstMatch(java.util.List<java.lang.String> lines,
java.util.regex.Pattern regex)
Finds the first match in a list os Strings.
|
public static java.lang.String convertToRegex(java.lang.String mask)
public static java.util.regex.Pattern fromMask(java.lang.String mask)
public static java.util.regex.Pattern compileSafe(java.lang.String pattern, java.util.regex.Pattern def)
public static java.lang.String getFirstMatch(java.util.List<java.lang.String> lines, java.util.regex.Pattern regex)
lines
- list of lines, may be null.regex
- pattern to match to.