title: Split arbitrary number of special characters in regex and give the array size
body: <p>I have s string in which * can come at arbitrary number. The regex pattern I use doesnt split at the beginning. I do not want to do the String.substring() to remove the * in the beginning. It can be that I have something like <code>"***place1*place2**place3*"</code>. Or something like <code>placeStr=**</code></p>
  
  <pre><code> String placeStr="*place1*place2**place3*";
   String[] places=placeStr.split("(\\*)+");
   System.out.println("array size" + places.length);
  </code></pre>
  
  <p>Also while using <code>String.split("(\\*)+")</code>to remove the <code>placeStr=**</code> gives a wrong array size if the input string is something like <code>***</code>. In this case I get array size as one. But I expect array size to be zero, since there is no places inside the array. What I want to count is the number of places.</p>