Crates.io | regexy |
lib.rs | regexy |
version | 0.2.0 |
source | src |
created_at | 2024-11-07 16:16:59.223592 |
updated_at | 2024-11-07 16:35:28.598919 |
description | 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 |
homepage | https://github.com/dr-montasir/regexy |
repository | https://github.com/dr-montasir/regexy |
max_upload_size | |
id | 1439936 |
size | 23,628 |
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.
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
regex
crate.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.");
}
}
The text contains digits!
// No digits found in the text.
This project is licensed under either of the following licenses:
You may choose either license for your purposes.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any feature requests or bug reports.