Expand description
Streaming API for fuzzy regex matching.
This module provides types for processing text streams incrementally, allowing fuzzy regex matching on large files, network streams, or any byte source without loading everything into memory.
§Example
use fuzzy_regex::FuzzyRegex;
let re = FuzzyRegex::new("(?:hello){e<=1}").unwrap();
let mut stream = re.stream();
// Feed chunks of data
let chunk1 = b"This is a test with hel";
let chunk2 = b"lo world in it";
for m in stream.feed(chunk1) {
println!("Match at {}-{}", m.start(), m.end());
}
for m in stream.feed(chunk2) {
println!("Match at {}-{}", m.start(), m.end());
}
// Finish processing to get any remaining matches
if let Some(m) = stream.finish() {
println!("Final match at {}-{}", m.start(), m.end());
}Structs§
- Byte
Matches - Iterator over matches in a byte slice (non-streaming).
- Feed
Matches - Iterator over matches from a single
feed()call. - Reader
Matches - Iterator over matches from a reader.
- Streaming
Match - A match found during streaming search.
- Streaming
Matcher - A streaming matcher for incremental fuzzy regex matching.