-
Notifications
You must be signed in to change notification settings - Fork 61
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
Clearer documentation for Re.eol #119
Comments
This is because I guess we can document which patterns are zero length and how Re.split treats those. I'll start with adding some tests to make sure that we don't accidentally touch this behavior however. |
rgrinberg
pushed a commit
that referenced
this issue
Jul 13, 2024
* Add examples for Re.split function Adds a few examples of using zero-length patterns as inputs to Re.split. Examples are taken from the test suite. Related to #119 and #120. * Clarify zero-length pattern split behavior * Add examples for Re.split_delim function Adds a few examples of using zero-length patterns as inputs to Re.split_delim. Examples are taken from the test suite. Related to #119 and #120.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would expect
Re.split Re.(compile eol) "a\nb"
to return["a"; 'b"]
but it returns["a"; "\nb"]
instead. If this is intended it would be nice to have this more clearly stated in the documentation.The text was updated successfully, but these errors were encountered: