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