String.replaceAll for multiple characters
<p>I have a line with <code>^||^</code> as my delimiter, I am using</p>

<pre><code>int charCount = line.replaceAll("[^" + fileSeperator + "]", "").length();  
if(fileSeperator.length()&gt;1)
{  
    charCount=charCount/fileSeperator.length();
    System.out.println(charCount+"char count between");  
}
</code></pre>

<p>This does not work if i have a line that has stray <code>|</code> or <code>^</code> as it counts these as well. How can i modify the regex or any other suggestions?</p>
