While developing java application I came across a problem while splitting string in java using pipe | as delimiter. The problem I was getting is that when using below code:
It splits the string on every single character. I wasted my 20 minutes solving this problem.
In the end I found that using double backslash before pipe in regular expression made it work fine.
I thought I should blog about this because if someone else run into this issue can save their 20 minutes which I wasted in finding such a minor issue.