[go: up one dir, main page]

regex 0.1.70

An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Documentation
1
2
3
4
5
6
7
8
// ASCII word boundaries are completely oblivious to Unicode characters.
// For Unicode word boundaries, the tests are precisely inverted.
matiter!(ascii1, r"\bx\b", "áxβ", (2, 3));
matiter!(ascii2, r"\Bx\B", "áxβ");

// We can still get Unicode mode in byte regexes.
matiter!(unicode1, r"(?u:\b)x(?u:\b)", "áxβ");
matiter!(unicode2, r"(?u:\B)x(?u:\B)", "áxβ", (2, 3));