this is heading.
let re = Regex::new(r"-+\n([^\n]+)\n-+").unwrap(); let contents: Vec<_> = re.split(txt).map(|s| s.trim()).collect();
wsequence!macro that may help you
alts for this. The unfortunate thing is that they are implemented up to a fixed number of branches, and I believe this number is less than 50. You can always have nested
alts though, or try to group your operators into some kind of semantic meaning to make the code less ugly.