// include the latest version of the regex crate in your Cargo.toml
extern crate regex;
use regex::Regex;
fn main() {
let regex = Regex::new(r"(?m)(^[#>]|(?!^)\G).*?\K(?:\[\[|]])").unwrap();
let string = "## [[zoom]] _[v]_
>[[move]] | [[very]] | [[quickly]]
__Synonyms__: [[buzz]] | [[dart]] | [[dash]] | [[dive]] | [[flash]] | [[fly]] | [[hum]] | [[hurtle]] | outstrip | [[rip]] | [[rocket]] | [[rush]] | [[shoot]] | [[shoot]] up | [[skyrocket]] | [[speed]] | [[streak]] | [[surge]] | [[tear]] | [[whirl]] | [[whiz]] | [[zip]]
__Concepts__: [[ACTIONS - MOTION#move oneself quickly (150)\\|move oneself quickly]]
__Antonyms__: decelerate, [[slow]]
## [[zip]] _[n]_
>[[enthusiasm]], [[energy]]
__Synonyms__: brio | [[drive]] | [[get]]-upand-[[go]] | [[go]] | [[gusto]] | [[life]] | liveliness | [[oomph]] | [[pep]] | [[pizzazz]] | [[punch]] | [[sparkle]] | [[spirit]] | [[verve]] | [[vigor]] | vim | [[vitality]] | [[zest]] | [[zing]]
__Concepts__: [[LIFE FORMS - GENERAL CHARACTERISTICS#personality (411)\\|personality]], [[STATES - ABSTRACT#behavior (633)\\|behavior]]
__Antonyms__: [[apathy]], enervation, [[idleness]], [[laziness]], [[lethargy]]
## [[zip]] _[v]_
>[[move]] | [[about]] | [[quickly]]
__Synonyms__: [[bustle]] | [[dash]] | [[flash]] | [[fly]] | [[hasten]] | [[hurry]] | [[run]] | [[rush]] | [[shoot]] | [[speed]] | [[tear]] | waltz | [[whisk]] | [[whiz]] | [[zoom]]
__Concepts__: [[ACTIONS - MOTION#move oneself quickly (150)\\|move oneself quickly]]
__Antonyms__: decelerate, [[slow]]";
let substitution = "";
// result will be a String with the substituted value
let result = regex.replace_all(string, substitution);
println!("{}", result);
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Rust, please visit: https://docs.rs/regex/latest/regex/