You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR it looks like full_split isn't getting unmatched groups right for delimiters after the first delimiter. I dug into the code, and it seems like the problem might be with the way that full_split invokes unsafe_pcre_exec. To wit, everywhere else except in the split functions (full_split, internal_psplit) the value of subj_start is always 0. But in these two functions, it is the same as pos.
When I changed this to 0, the bug evinced in the post above disappeared.
I'm going to dig further, but I thought I'd report this, and ask for your feedback. If you're still actively maintaining this code, I'll send a PR; otherwise, I'll just fix it in the pcre2 codebase.
The text was updated successfully, but these errors were encountered:
Over at the OCaml discussion forum, someone found what looks like a bug with
full_split
: https://discuss.ocaml.org/t/full-split-in-pcre/12948/1TL;DR it looks like full_split isn't getting unmatched groups right for delimiters after the first delimiter. I dug into the code, and it seems like the problem might be with the way that full_split invokes
unsafe_pcre_exec
. To wit, everywhere else except in thesplit
functions (full_split, internal_psplit) the value ofsubj_start
is always0
. But in these two functions, it is the same aspos
.When I changed this to
0
, the bug evinced in the post above disappeared.I'm going to dig further, but I thought I'd report this, and ask for your feedback. If you're still actively maintaining this code, I'll send a PR; otherwise, I'll just fix it in the
pcre2
codebase.The text was updated successfully, but these errors were encountered: