public class Regexps extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
contains(String text,
Regexp regexp)
判断 文本中 是否包含指定的 正则可匹配的内容
|
static Regexp |
createRegexp(Pattern pattern) |
static Regexp |
createRegexp(RegexpEngine engine,
String pattern,
Option option) |
static Regexp |
createRegexp(String pattern) |
static Regexp |
createRegexp(String pattern,
int flags) |
static Regexp |
createRegexp(String pattern,
Option option) |
static Regexp |
createRegexp(String pattern,
String flags) |
static Regexp |
createRegexp(String engineName,
String pattern,
Option option) |
static Map<String,String> |
findNamedGroup(Regexp regexp,
String text) |
static List<Map<String,String>> |
findNamedGroups(Regexp regexp,
String text) |
static boolean |
match(Regexp regexp,
String text)
判断文本与正则是否匹配
|
static boolean |
match(String regexp,
int flags,
String text)
判断文本与正则是否匹配
|
static boolean |
match(String regexp,
String text)
判断文本与正则是否匹配
|
static Map<String,String> |
namedGroups(RegexpMatcher matcher,
Set<String> groupNames) |
public static Regexp createRegexp(@Nullable String engineName, @NonNull String pattern, @Nullable Option option)
public static Regexp createRegexp(@Nullable RegexpEngine engine, @NonNull String pattern, @Nullable Option option)
public static boolean contains(String text, Regexp regexp)
public static List<Map<String,String>> findNamedGroups(Regexp regexp, String text)
public static Map<String,String> findNamedGroup(Regexp regexp, String text)
Copyright © 2022. All rights reserved.