public class Regex
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
UNICODE_CHARACTER_CLASS
This Regex /
Pattern flag is supported from Java 7 on. |
Constructor and Description |
---|
Regex() |
Modifier and Type | Method and Description |
---|---|
static java.util.regex.Pattern |
compile(java.lang.String regex,
java.lang.String flags) |
static int |
flagsFromString(java.lang.String flags) |
static java.lang.String |
flagsToString(int flags) |
static boolean |
isMatchAllPattern(java.lang.String str) |
static boolean |
isSimpleMatchPattern(java.lang.String str)
Is the str a simple match pattern.
|
static boolean |
simpleMatch(java.lang.String[] patterns,
java.lang.String str)
Match a String against the given patterns, supporting the following simple
pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an
arbitrary number of pattern parts), as well as direct equality.
|
static boolean |
simpleMatch(java.lang.String[] patterns,
java.lang.String[] types) |
static boolean |
simpleMatch(java.lang.String pattern,
java.lang.String str)
Match a String against the given pattern, supporting the following simple
pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an
arbitrary number of pattern parts), as well as direct equality.
|
public static final int UNICODE_CHARACTER_CLASS
Pattern
flag is supported from Java 7 on.
If set on a Java6 JVM the flag will be ignored.public static boolean isSimpleMatchPattern(java.lang.String str)
public static boolean isMatchAllPattern(java.lang.String str)
public static boolean simpleMatch(java.lang.String pattern, java.lang.String str)
pattern
- the pattern to match againststr
- the String to matchpublic static boolean simpleMatch(java.lang.String[] patterns, java.lang.String str)
patterns
- the patterns to match againststr
- the String to matchpublic static boolean simpleMatch(java.lang.String[] patterns, java.lang.String[] types)
public static java.util.regex.Pattern compile(java.lang.String regex, java.lang.String flags)
public static int flagsFromString(java.lang.String flags)
public static java.lang.String flagsToString(int flags)