Macro lazy_regex_proc_macros::lazy_regex
source · lazy_regex!() { /* proc-macro */ }
Expand description
Return an instance of once_cell::sync::Lazy<regex::Regex>
or
once_cell::sync::Lazy<regex::bytes::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.