regex

Macro regex 

Source
macro_rules! regex {
    ($re:expr) => { ... };
}
Expand description

Generates a lazy regex::Regex and perform regex validation. The code fails to compile if the regex is invalid.

§Errors

Compilation fails if the regex is invalid.

§Examples

let re = lure::regex!("[0-9a-f]+");
assert!(re.is_match("Test1234ccc#"));

This example fails to compile because the regex is invalid.

let re = lure::regex!(r"/^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/");