macron_regex/
lib.rs

1#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
2
3/// Creates a new instance of [Regex](https://docs.rs/regex/latest/regex/struct.Regex.html)
4#[macro_export]
5macro_rules! re {
6    ($($tokens:tt)*) => {{
7        ::regex::Regex::new(&::std::format!($($tokens)*)).unwrap()
8    }};
9
10    ($expr:expr) => {{
11        ::regex::Regex::new(&::std::format!($expr)).unwrap()
12    }};
13}