public class MatchUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static Pattern |
patternParam |
| 构造器和说明 |
|---|
MatchUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<String> |
listMatchHtmlAttrValue(String source,
String element,
String attr)
获取指定HTML标签的指定属性的值
|
static List<String> |
listMatchHtmlValue(String source,
String element,
String attr,
String attrVal)
获取指定属性值得HTML标签的text内容
|
static String |
matchplaceValue(String s,
Map<?,?> params)
根据$ 匹配 $+{+参数名称+} ;
根据参数名称获取参数 params中的值 此功能可用作模板填充中 |
static String |
singleMatchHtmlAttrValue(String source,
String element,
String attr)
获取指定HTML标签的指定属性的值
|
static String |
singleMatchHtmlValue(String source,
String element,
String attr,
String attrVal)
获取指定属性值得HTML标签的text内容
|
public static final Pattern patternParam
public static String matchplaceValue(String s, Map<?,?> params)
s - 元数据params - 参数Mappublic static List<String> listMatchHtmlAttrValue(String source, String element, String attr)
source - 要匹配的源文本element - 标签名称attr - 标签的属性名称public static String singleMatchHtmlAttrValue(String source, String element, String attr)
source - 要匹配的源文本element - 标签名称attr - 标签的属性名称public static String singleMatchHtmlValue(String source, String element, String attr, String attrVal)
source - 要匹配的源文本element - 标签名称attr - 标签的属性名称attrVal - 指定的属性值Copyright © 2017 letcode. All rights reserved.