| Crates.io | pretty_regex |
| lib.rs | pretty_regex |
| version | 1.0.5 |
| created_at | 2023-08-09 04:11:08.299623+00 |
| updated_at | 2023-12-03 11:37:03.724939+00 |
| description | 🧶 Elegant and readable way of writing regular expressions |
| homepage | |
| repository | https://github.com/abs0luty/pretty_regex |
| max_upload_size | |
| id | 939754 |
| size | 40,001 |
The crate provides a clean and readable way of writing your regex in the Rust programming language:
|
Without |
With |
|
|
|
|
|
|
To convert a PrettyRegex into a regex from regex crate, you can call to_regex or to_regex_or_panic:
use pretty_regex::digit;
let regex = (digit() + ascii_alphabetic().optional()).to_regex_or_panic();
assert!(regex.is_match("3"));