1 stable release
1.0.0 | Oct 31, 2024 |
---|
#358 in Testing
465KB
12K
SLoC
Regex ANRE
ANRE is a brand new regex language that offers all the capabilities of traditional regex but in much simpler form.
Designed with user-friendliness in mind, ANRE requires no prior knowledge to get started and can be seamlessly converted to and from traditional regex.
(ANRE is short for XiaoXuan Regular Expression)
regex-anre is a lightweight (zero dependency) but comprehensive regular expression engine, it supports both standard regular expression and the ANRE language. It also supports JIT and has excellent performance.
regex-anre
provides the same API as the Rust standard regex, you can directly use regex-anre
to replace the standard regex without changing the existing code.
Features
- Lightweight The library regex-anre has no dependencies.
- Comprehensive Supports most regex features, including back-reference, look-ahead and look-behind assertions.
- High performance The JIT edition regex-jit provides excellent performance.
Quick Start
use regex_anre::Regex;
let re = Regex::new("...").unwrap();
// or, create a regex using ANRE language:
// let re = Regex::from_anre("...").unwrap();
let mut matches = re.find_iter("...");
for m in matches {
println("{}", m.as_str());
}
See https://docs.rs/regex/latest/regex/ for details.
TODO