Skip to content

Fix Pcre.split#538

Merged
rgrinberg merged 1 commit intomasterfrom
pcre-split
Oct 25, 2024
Merged

Fix Pcre.split#538
rgrinberg merged 1 commit intomasterfrom
pcre-split

Conversation

@vouillon
Copy link
Copy Markdown
Member

An occurrence of the delimiter at the beginning or at the end of the string is ignored.

Fixes #288, fixes #411.

An occurrence of the delimiter at the beginning or at the end of the
string is ignored.

Fixes #288, fixes #411.
@rgrinberg
Copy link
Copy Markdown
Member

Thanks. A changes entry is warranted.

@rgrinberg rgrinberg merged commit 8ec3918 into master Oct 25, 2024
Comment on lines 6 to +7
split ~rex:re_whitespace "aa bb c d ";
[%expect {| ["aa"; "bb"; "c"; "d"; ""] |}];
[%expect {| ["d"; "c"; "bb"; "aa"] |}];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong; the output is reversed here, but not if the delimiter is present at the beginning of the string (eg in other test cases)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

re 1.12 broke tests in a dose3 Behavior or Re.Pcre.split when only separators are found

3 participants