ocaml-re icon indicating copy to clipboard operation
ocaml-re copied to clipboard

`Re.split_full` returns `[]` when passed `""`

Open dra27 opened this issue 3 years ago • 1 comments

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

dra27 avatar Nov 14 '22 10:11 dra27

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).

vouillon avatar Dec 04 '23 14:12 vouillon