Escape regexes within matches() (#155)

This commit is contained in:
mdecimus
2024-03-07 16:57:53 +01:00
parent 5b30d49327
commit 3081958765
8 changed files with 21 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ impl Expression {
captures.clear();
let value = stack.pop().unwrap_or_default().into_string();
for captures_ in regex.captures_iter(value.as_ref()) {
if let Some(captures_) = regex.captures(value.as_ref()) {
for capture in captures_.iter() {
captures.push(capture.map_or("", |m| m.as_str()).to_string());
}