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
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:
This is because eol is more of a zero length assertion. You can use something like Re.(split (compile (char '\n'))) to get the behavior that you want.
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.
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: