Java string split: If I split "0" with delimiter "|" I expect array of one element as in ["0"]. But what I actually get is {"","0"}
How to fix this? Thanks
Java string split: If I split "0" with delimiter "|" I expect array of one element as in ["0"]. But what I actually get is {"","0"}
How to fix this? Thanks
Argument to string split is a regex not a string. So pipeline symbol does not mean pipeline symbol. Why does String.split need pipe delimiter to be escaped?
Using "\\|" worked