I'm porting a lib from JS to Rust (Yet Another..). There is a Regex in this library:
const REGEXP = /(\w+)=("[^"]*")/g;
Which will try to find a match in this string: error="invalid_token", error_description="bad things are happening"
I have a rust code that is as follows.
This does not find any match with in the the above string.
Is there something wrong with the rust code?
let regex = Regex::new(r#"/(\w+)=("[^"]*")/g"#).unwrap();
for m in
regex.find_iter("error=\"invalid_token\", error_description=\"bad things are happening\"")
{
let a = m;
}