Returns an iterator of substrings of `text` delimited by a match of the regular expression. Namely, each element of the iterator corresponds to text that *isn't* matched by the regular expression. This method will *not* copy the text given. # Example To split a string delimited by arbitrary amounts of spaces or tabs: ```rust # extern crate regex; use regex::bytes::Regex; # fn main() { let re =
(&'r self, text: &'t [u8])
| 314 | /// # } |
| 315 | /// ``` |
| 316 | pub fn split<'r, 't>(&'r self, text: &'t [u8]) -> Split<'r, 't> { |
| 317 | Split { |
| 318 | finder: self.find_iter(text), |
| 319 | last: 0, |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | /// Returns an iterator of at most `limit` substrings of `text` delimited |
| 324 | /// by a match of the regular expression. (A `limit` of `0` will return no |