Lines Matching defs:regex
8 // This technically solves the problem posed in the `regex-dna` benchmark, but
9 // it cheats by combining all of the replacements into a single regex and
17 macro_rules! regex {
19 ::regex::Regex::new($re).unwrap()
28 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned();
33 regex!("agggtaaa|tttaccct"),
34 regex!("[cgt]gggtaaa|tttaccc[acg]"),
35 regex!("a[act]ggtaaa|tttacc[agt]t"),
36 regex!("ag[act]gtaaa|tttac[agt]ct"),
37 regex!("agg[act]taaa|ttta[agt]cct"),
38 regex!("aggg[acg]aaa|ttt[cgt]ccct"),
39 regex!("agggt[cgt]aa|tt[acg]accct"),
40 regex!("agggta[cgt]a|t[acg]taccct"),
41 regex!("agggtaa[cgt]|[acg]ttaccct"),
63 ]; // combined into one regex in `replace_all`
80 let re = regex!(&alternates.join("|"));