| 程序包 | 说明 |
|---|---|
| com.jn.langx.text | |
| com.jn.langx.text.grok | |
| com.jn.langx.text.i18n | |
| com.jn.langx.text.stringtemplate | |
| com.jn.langx.util.io.unicode | |
| com.jn.langx.util.net.http.jaxrs | |
| com.jn.langx.util.net.http.jaxrs.internal | |
| com.jn.langx.util.pattern.glob | |
| com.jn.langx.util.regexp | |
| com.jn.langx.util.regexp.jdk | |
| com.jn.langx.util.regexp.named |
JDK中的Regexp 从 JDK7 开始,支持 named capturing group,之前是不支持的,
该package 用于为 JDK5,JDK6扩展出支持 named capturing group
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
StringTemplates.format(String template,
Regexp variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args) |
static String |
StringTemplates.format(String template,
Regexp variablePattern,
PlaceholderParser variableValueProvider) |
| 限定符和类型 | 字段和说明 |
|---|---|
static Regexp |
Groks.GROK_PATTERN
Extract Grok patter like %{FOO} to FOO, Also Grok pattern with semantic.
|
static Regexp |
Groks.NAMED_REGEX |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<ScriptCode> |
ScriptCode.findByName(Regexp pattern)
Get a list of
ScriptCode by a name pattern. |
static List<LanguageCode> |
LanguageCode.findByName(Regexp pattern)
Get a list of
LanguageCode by a name pattern. |
static List<LanguageAlpha3Code> |
LanguageAlpha3Code.findByName(Regexp pattern)
Get a list of
LanguageAlpha3Code by a name pattern. |
static List<CurrencyCode> |
CurrencyCode.findByName(Regexp pattern) |
static List<CountryCode> |
CountryCode.findByName(Regexp regexp)
Get a list of
CountryCode by a name pattern. |
| 限定符和类型 | 字段和说明 |
|---|---|
static Regexp |
StringTemplate.defaultPattern
index pattern
|
| 限定符和类型 | 方法和说明 |
|---|---|
Regexp |
CustomPatternStringFormatter.getVariablePattern() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
CustomPatternStringFormatter.setVariablePattern(Regexp variablePattern) |
StringTemplate |
StringTemplate.variablePattern(Regexp regexp) |
| 构造器和说明 |
|---|
CustomPatternStringFormatter(Regexp variableRegexp,
Function2<String,Object[],String> valueGetter) |
| 限定符和类型 | 字段和说明 |
|---|---|
static Regexp |
Utf8s.ESCAPED_CHAR_REGEXP
e.g. : \x5C
e.g. :
e.g.
|
| 构造器和说明 |
|---|
PatternWithGroups(Regexp regexPattern)
Construct a new pattern.
|
PatternWithGroups(Regexp regexPattern,
int[] groupIndexes)
Construct a new pattern.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static Regexp |
UriTemplateParser.TEMPLATE_VALUE_PATTERN
Default URI template value regexp pattern.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Regexp |
UriTemplateParser.getPattern()
Get the pattern.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,Regexp> |
UriTemplateParser.getNameToPattern()
Get the map of template names to patterns.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Regexp |
GlobPattern.compile(String globPattern)
Compile glob pattern string
|
Regexp |
GlobPattern.getRegexp() |
| 限定符和类型 | 字段和说明 |
|---|---|
static Regexp |
RegexpPatterns.CHINESE_CHAR |
static Regexp |
RegexpPatterns.CHINESE_CHARS |
static Regexp |
RegexpPatterns.COMMA_SPLIT_PATTERN |
static Regexp |
RegexpPatterns.PATTERN_EMAIL
邮件
http://emailregex.com/
|
static Regexp |
RegexpPatterns.PATTERN_HEX
16进制字符串
|
static Regexp |
RegexpPatterns.PATTERN_IDENTITY
18位身份证号码
|
static Regexp |
RegexpPatterns.PATTERN_IP
IP地址
https://ipregex.com/
|
static Regexp |
RegexpPatterns.PATTERN_MOBILE
手机号
|
static Regexp |
RegexpPatterns.PATTERN_PLATE_NUMBER
中国车牌号码(兼容新能源车牌)
|
static Regexp |
RegexpPatterns.PATTERN_QQ
QQ 号
|
static Regexp |
RegexpPatterns.PATTERN_SOCIAL_CREDIT_CODE
社会统一信用代码
第一部分:登记管理部门代码1位 (数字或大写英文字母)
第二部分:机构类别代码1位 (数字或大写英文字母)
第三部分:登记管理机关行政区划码6位 (数字)
第四部分:主体标识码(组织机构代码)9位 (数字或大写英文字母)
第五部分:校验码1位 (数字或大写英文字母)
|
static Regexp |
RegexpPatterns.PATTERN_URL
URL 地址
https://urlregex.com/
|
static Regexp |
RegexpPatterns.PATTERN_ZIP_CODE
中国邮编
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Regexp |
Regexps.createRegexp(Pattern pattern) |
static Regexp |
Regexps.createRegexp(RegexpEngine engine,
String pattern,
Option option) |
static Regexp |
Regexps.createRegexp(String pattern) |
static Regexp |
Regexps.createRegexp(String pattern,
int flags) |
static Regexp |
Regexps.createRegexp(String pattern,
Option option) |
static Regexp |
Regexps.createRegexp(String pattern,
String flags) |
static Regexp |
Regexps.createRegexp(String engineName,
String pattern,
Option option) |
Regexp |
RegexpEngine.get(String pattern,
Option option)
创建 Regexp实例
|
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
Regexps.contains(String text,
Regexp regexp)
判断 文本中 是否包含指定的 正则可匹配的内容
|
static boolean |
RegexpPatterns.contains(String text,
Regexp pattern)
判断是否存在匹配的部分
|
static Map<String,String> |
Regexps.findNamedGroup(Regexp regexp,
String text) |
static List<Map<String,String>> |
Regexps.findNamedGroups(Regexp regexp,
String text) |
static boolean |
Regexps.match(Regexp regexp,
String text)
判断文本与正则是否匹配
|
static boolean |
RegexpPatterns.test(Regexp pattern,
String string)
判断字符串是否与pattern
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
JdkRegexp |
| 限定符和类型 | 方法和说明 |
|---|---|
Regexp |
JdkRegexpEngine.get(String regexp,
Option option) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
NamedRegexp
A compiled representation of a regular expression.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Regexp |
Jdk6NamedRegexpEngine.get(String regexp,
Option option) |
Copyright © 2022. All rights reserved.