Skip to content

Commit 73282aa

Browse files
committed
update doc
1 parent a97abc3 commit 73282aa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ or use static method
1919
````java
2020
String followers = Extractors.on(baseHtml).extract(selector("div.followers")).with(regex("\\d+")).asString();
2121
````
22+
more method
23+
24+
````
25+
String year = Extractors.on("<div> Talk is cheap. Show me the code. - Fri, 25 Aug 2000 </div>")
26+
.extract(selector("div")) // extract with selector
27+
.filter(value -> value.trim()) // trim result
28+
.with(regex("20\\d{2}")) // get year with regex
29+
.filter(value -> "from " + value) // append 'form' string
30+
.asString();
31+
Assert.assertEquals("from 2000", year);
32+
````
2233

2334
###extract data to map
2435

0 commit comments

Comments
 (0)