public final class Regex extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
static boolean |
simpleMatch(String pattern,
String str,
boolean caseInsensitive)
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 boolean simpleMatch(String pattern, String str)
pattern - the pattern to match againststr - the String to matchpublic static boolean simpleMatch(String pattern, String str, boolean caseInsensitive)
pattern - the pattern to match againststr - the String to matchcaseInsensitive - true if ASCII case differences should be ignoredCopyright © 2021. All rights reserved.