Looking at their current iteration of the code, the problem is not in the regex crate's API, but rather on them not having the ownership system internalized yet.
https://doc.rust-lang.org/rust-by-example/ and https://github.com/rust-lang/rustlings might be good places to visit to gain that experience, as well as improving the specific diagnostics to be more actionable.
Re:Rust is for Professionals
by burntsushi on Tuesday April 13, 2021 @01:17PM
(#26795666)
> the problem is not in the regex crate's API, but rather on them not having the ownership system internalized yet
Yes, I figured that to be the case, but still wanted to say, "Discussions are open for questions, even if they are beginner related, as long as it's related to regex'ing somehow." :-)
I think what's being called "trivial" is doing a bit of regex searching. It's probably accurate to call that trivial for an experienced Rust programmer, but if you're just beginning, I don't think it's helpful to call anything trivial. I still remember my first exposure to Rust. It was different. It took a bit to grok. But once it clicked, things were much better.
As the maintainer of the regex crate, I invite you or anyone to ask for help using regexes. The regex repo has Discussions opened up, so it's appropriate to ask for help, even if they are beginner questions: https://github.com/rust-lang/regex/discussions
As usual though, try to provide as many details as you can. Giving the source code you have but can't get to work is a great start, for example.