Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re.split_full returns [] when passed "" #215

Open
dra27 opened this issue Nov 14, 2022 · 1 comment
Open

Re.split_full returns [] when passed "" #215

dra27 opened this issue Nov 14, 2022 · 1 comment

Comments

@dra27
Copy link
Member

dra27 commented Nov 14, 2022

Both Re.split and Re.split_full should return [`Text ""] and [""] respectively for any regular expression when passed "".

@dra27 dra27 changed the title Re.split_full return [] when passed "" Re.split_full returns [] when passed "" Nov 14, 2022
@vouillon
Copy link
Member

vouillon commented Dec 4, 2023

I think it makes a lot of sense that a `Text "" is included in the output of Re.split_full only between delimiters.

#233 adds a Re.split_delim function which returns [""] when passed the empty string (and a regular expression which does not match the empty string).

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

No branches or pull requests

2 participants