1#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
2
3#[cfg(feature = "regex")]
4pub use regex::{self, Match, Regex};
5
6#[cfg(feature = "regex")]
8#[macro_export]
9macro_rules! re {
10 ($($tokens:tt)*) => {{
11 $crate::regex::Regex::new(&::std::format!($($tokens)*)).unwrap()
12 }};
13
14 ($expr:expr) => {{
15 $crate::regex::Regex::new(&::std::format!($expr)).unwrap()
16 }};
17}
18
19#[cfg(not(feature = "regex"))]
21#[macro_export]
22macro_rules! re {
23 ($($tokens:tt)*) => {{
24 ::regex::Regex::new(&::std::format!($($tokens)*)).unwrap()
25 }};
26
27 ($expr:expr) => {{
28 ::regex::Regex::new(&::std::format!($expr)).unwrap()
29 }};
30}