-
Notifications
You must be signed in to change notification settings - Fork 488
Closed
Description
What version of regex are you using?
1.6.0
Describe the bug at a high level.
my regex \\"vault\\"\\:[\\"]?(\\{.*?data.*?\\}) compile with nodejs but seem to have a problem with this library.
What are the steps to reproduce the behavior?
use regex::Regex;
fn main() {
let regex = Regex::new(r#"\\"vault\\"\\:[\\"]?(\\{.*?data.*?\\})"#).unwrap();
let string = r#"roller":{"vault":"{\\"data\\":\\"nac2xYOoNouaNXgx11iiwYLW\\",\\"iv\\":\\"0/h9/3zXRzIALeXu6tHyRA==\\",\\"salt\\":\\"R7eS1IV7k6maUUNivx86OHT/hHhUFpXZgW3Ip1vFp+I=\\"}"}"#;
let result = regex.captures_iter(string);
for mat in result {
println!("{:?}", mat);
}
}
What is the actual behavior?
hread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
\\"vault\\"\\:[\\"]?(\\{.*?data.*?\\})
^
error: repetition quantifier expects a valid decimal
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)', src\main.rs:4:73
What is the expected behavior?
"vault":"{\\"data\\":\\"nac2xYOoNouaNXgx11iiwYLW\\",\\"iv\\":\\"0/h9/3zXRzIALeXu6tHyRA==\\",\\"salt\\":\\"R7eS1IV7k6maUUNivx86OHT/hHhUFpXZgW3Ip1vFp+I=\\"}
Metadata
Metadata
Assignees
Labels
No labels