Splitting string with character sequence as a delimiter
<p>The requirement is to split strings in Java so that the following</p>

<p>"this#{s}is#{s}a#{s}string"</p>

<p>would result in the following array</p>

<p>["this","is","a","string"]</p>

<p>As you can see here the delimiter is the character sequence "#{s}".</p>

<p>What is the fastest and efficient way of doing this using existing tools?</p>

<p>Am I right to assume that using regex (String.split()) is a bit of wasting because we are splitting using static string?</p>

<p>I got the assumption from here <a href="http://www.javamex.com/tutorials/regular_expressions/splitting_tokenisation_performance.shtml" rel="nofollow">http://www.javamex.com/tutorials/regular_expressions/splitting_tokenisation_performance.shtml</a> .
But I cannot use StringTokenizer since the delimiter is a sequence of char.</p>

<p>Note: currently I'm using String.split() and have no problem with that. This is pure curiosity.</p>
