Macro lazy_regex::lazy_regex[][src]

lazy_regex!() { /* proc-macro */ }
Expand description

Return an instance of once_cell::sync::Lazy<regex::Regex> that you can use in a public static declaration.

Example:

pub static GLOBAL_REX: Lazy<Regex> = lazy_regex!("^ab+$"i);

As for other macros, the regex is checked at compilation time.