Why does String.split need pipe delimiter to be escaped?

String.split expects a regular expression argument. An unescaped | is parsed as a regex meaning “empty string or empty string,” which isn’t what you mean.

Leave a Comment