Macro lazy_regex

Source
macro_rules! lazy_regex {
    ($regex:tt) => { ... };
    (ref $regex:tt) => { ... };
}
Expand description

Creates a LazyRegex.

  • If supplied a string literal, it will create LazyRegex from it.
  • If the literal is prepended with ref, this will create a private static and reference it (i.e., return &'static LazyRegex). This is useful for single-use regexes inlined into config attributes.

ยงExamples

See LazyRegex docs for the examples of usage.