Constructor and Description |
---|
RegexSelector(String regexStr)
Create a RegexSelector.
|
RegexSelector(String regexStr,
int group) |
Modifier and Type | Method and Description |
---|---|
String |
select(String text)
Extract single result in text.
If there are more than one result, only the first will be chosen. |
us.codecraft.webmagic.selector.RegexResult |
selectGroup(String text) |
List<us.codecraft.webmagic.selector.RegexResult> |
selectGroupList(String text) |
List<String> |
selectList(String text)
Extract all results in text.
|
String |
toString() |
public RegexSelector(String regexStr, int group)
public RegexSelector(String regexStr)
regexStr
- public String select(String text)
Selector
public List<String> selectList(String text)
Selector
selectList
in interface Selector
text
- textpublic us.codecraft.webmagic.selector.RegexResult selectGroup(String text)
public List<us.codecraft.webmagic.selector.RegexResult> selectGroupList(String text)
Copyright © 2017. All rights reserved.