Escape special characters in java
<p>I have a text file having <code>|</code> (pipe) as the separator. If I am reading a column and the column itself also contains <code>|</code> then it while separating another column is created.</p>

<p>Example :</p>

<pre><code>name|date|age
zzz|20-03-22|23
"xx|zz"|23-23-33|32
</code></pre>

<p>How can I escape the character within the double quotes <code>""</code>
how to escape the regular expression used in the split, so that it works for user-specified delimiters
i have tried 
 String[] cols = line.split("\|");
                System.out.println("lets see column only=="+cols[1]);</p>
