1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

regex: fix issue with multiple repetitions out of the groups (#17774)

This commit is contained in:
penguindark
2023-03-25 19:49:01 +01:00
committed by GitHub
parent 24cc5920e6
commit 3d2d330478
2 changed files with 39 additions and 2 deletions

View File

@ -2520,7 +2520,9 @@ pub fn (mut re RE) match_base(in_txt &u8, in_txt_len int) (int, int) {
// stop already started matching outside a capturing group
if re.state_list.len > 0 && re.state_list.last().group_index == -1
&& re.state_list.last().last_dot_pc > 0 {
return regex.no_match_found, 0
if ist == regex.ist_dot_char || ist == regex.ist_bsls_char {
return regex.no_match_found, 0
}
}
continue
}