Skip to content

Commit

Permalink
Merge branch 'main' of github.com:zkemail/zk-regex into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisht13 committed Aug 30, 2024
2 parents bbd7e66 + 9195cb0 commit dd5bd7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/apis/src/extract_substrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub fn extract_substr_idxes(
// Construct the full regex pattern with groups for each part
let mut entire_regex_str = String::new();
for (_, part) in regex_config.parts.iter().enumerate() {
entire_regex_str += &format!("({})", part.regex_def); // Wrap each part in a group
let adjusted_regex_def = part.regex_def.replace("(", "(?:");
entire_regex_str += &format!("({})", adjusted_regex_def); // Wrap each part in a group
}

// Compile the entire regex
Expand Down

0 comments on commit dd5bd7a

Please sign in to comment.