utkarshkukreti / select.rs

A Rust library to extract useful data from HTML documents, suitable for web scraping.
MIT License
971 stars 69 forks source link

Implement Predicate trait with argument of regex::Regex #48

Open atk91 opened 6 years ago

atk91 commented 6 years ago

For example, it would be very useful to search nodes with some attributes values matching regex, e.g.

for node in document.find(Attr("class", Regex::new(r"^content-.*$").unwrap())) {
   // do something
}