1 macro_rules! regex_new { 2 ($re:expr) => {{ 3 use regex::internal::ExecBuilder; 4 ExecBuilder::new($re) 5 .bounded_backtracking() 6 .only_utf8(false) 7 .build() 8 .map(|e| e.into_byte_regex()) 9 }}; 10 } 11 12 macro_rules! regex { 13 ($re:expr) => { 14 regex_new!($re).unwrap() 15 }; 16 } 17 18 macro_rules! regex_set_new { 19 ($re:expr) => {{ 20 use regex::internal::ExecBuilder; 21 ExecBuilder::new_many($re) 22 .bounded_backtracking() 23 .only_utf8(false) 24 .build() 25 .map(|e| e.into_byte_regex_set()) 26 }}; 27 } 28 29 macro_rules! regex_set { 30 ($res:expr) => { 31 regex_set_new!($res).unwrap() 32 }; 33 } 34 35 // Must come before other module definitions. 36 include!("macros_bytes.rs"); 37 include!("macros.rs"); 38 39 mod api; 40 mod bytes; 41 mod crazy; 42 mod flags; 43 mod fowler; 44 mod multiline; 45 mod noparse; 46 mod regression; 47 mod replace; 48 mod set; 49 mod suffix_reverse; 50 #[cfg(feature = "unicode")] 51 mod unicode; 52 #[cfg(feature = "unicode-perl")] 53 mod word_boundary; 54 #[cfg(feature = "unicode-perl")] 55 mod word_boundary_ascii; 56