public class Regex extends 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 Pattern |
compile(String regex,
String flags) |
static int |
flagsFromString(String flags) |
static String |
flagsToString(int flags) |
static boolean |
isMatchAllPattern(String str) |
static boolean |
isSimpleMatchPattern(String str)
Is the str a simple match pattern.
|
static boolean |
simpleMatch(String[] patterns,
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(String[] patterns,
String[] types) |
static boolean |
simpleMatch(String pattern,
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(String str)
public static boolean isMatchAllPattern(String str)
public static boolean simpleMatch(String pattern, String str)
pattern
- the pattern to match againststr
- the String to matchpublic static boolean simpleMatch(String[] patterns, String str)
patterns
- the patterns to match againststr
- the String to matchpublic static int flagsFromString(String flags)
public static String flagsToString(int flags)
Copyright © 2009–2016. All rights reserved.