title: Splitting a string on the double pipe(||) using String.split()
body: <p>I'm trying to split the string with double pipe(||) being the delimiter.String looks something like this:</p>
  
  <pre><code>String str ="user@email1.com||user@email2.com||user@email3.com";
  </code></pre>
  
  <p>i'm able to split it using the StringTokeniser.The javadoc says the use of this class is discouraged and instead look at String.split as option.</p>
  
  <pre><code>StringTokenizer token = new StringTokenizer(str, "||");
  </code></pre>
  
  <p>The above code works fine.But not able to figure out why below string.split function not giving me expected result..</p>
  
  <pre><code>String[] strArry = str.split("\\||");
  </code></pre>
  
  <p>Where am i going wrong..?</p>