Like new, but compiles the union of the given regular expressions. Note that when compiling 2 or more regular expressions, capture groups are completely unsupported. (This means both `find` and `captures` wont work.)
(res: I)
| 136 | /// are completely unsupported. (This means both `find` and `captures` |
| 137 | /// wont work.) |
| 138 | pub fn new_many<I, S>(res: I) -> Self |
| 139 | where S: AsRef<str>, I: IntoIterator<Item=S> { |
| 140 | let mut opts = RegexOptions::default(); |
| 141 | opts.pats = res.into_iter().map(|s| s.as_ref().to_owned()).collect(); |
| 142 | Self::new_options(opts) |
| 143 | } |
| 144 | |
| 145 | /// Create a regex execution builder. |
| 146 | pub fn new_options(opts: RegexOptions) -> Self { |