regexy

Crates.ioregexy
lib.rsregexy
version0.2.0
sourcesrc
created_at2024-11-07 16:16:59.223592
updated_at2024-11-07 16:35:28.598919
descriptionA 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
homepagehttps://github.com/dr-montasir/regexy
repositoryhttps://github.com/dr-montasir/regexy
max_upload_size
id1439936
size23,628
Dr. Montasir (dr-montasir)

documentation

README

LOGO
github crates.io docs.rs license license

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

github

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

Dr. Montasir Mirghani

Commit count: 2

cargo fmt