I have this code in function:
pub fn search_corrections(content: &str) {
let regex_corrections = Regex::new("(\\[\\[)(.*?)(\\|)(.*?)(\\]\\])").unwrap();
for found in regex_corrections.captures_iter(&content) {
println!("{:#?}", found);
}
}
I want to produce next vector at the end of function: first "layer" will be number of matches, like first match equalls vectored[0] etc. While second "layer" equals matches of regex. For example, this function's vectored[0][0] in this context:
fn main() {
search_corrections("[[hello|world]]");
}
Should produce "[[hello|world]]", then vectored[0][1] would equal to "[[", etc.
How do i make this nested vector ???