2 unstable releases
0.2.0 | Nov 7, 2024 |
---|---|
0.1.0 | Nov 7, 2024 |
#411 in Text processing
242 downloads per month
Used in gprs
9KB
REGEXY
REGEXY provides a simple and lightweight Rust library for working with regular expressions. The regexy
crate provides an easy-to-use interface for matching patterns in strings using regex.
Table of Contents
Installation
Run the following Cargo command in your project directory:
cargo add regexy
Or add regexy
to your Cargo.toml
file:
[dependencies]
regexy = "MAJOR.MINOR.PATCH" # Replace with the latest version
Changelog
Features
- Check if a string matches a regex pattern.
- Easy integration with the
regex
crate. - Simple API for common regex operations.
Usage
use regexy::utils::is_match;
fn main() {
let pattern = r"\d+";
let text = "There are 123 apples.";
// let text = "There are three apples.";
if is_match(pattern, text) {
println!("The text contains digits!");
} else {
println!("No digits found in the text.");
}
}
Result
The text contains digits!
// No digits found in the text.
License
This project is licensed under either of the following licenses:
- MIT License
- Apache License, Version 2.0
You may choose either license for your purposes.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any feature requests or bug reports.
Author
Dependencies
~2.2–3MB
~55K SLoC