title: removing empty lines using java regex
body: <p>I have an interesting string I want to properly break up into a string array. This string is as follows.</p>
  
  <pre><code>String test="?[32,120],x1y1,[object pieceP1],null]";
  </code></pre>
  
  <p>Now I have this regular expression to attack this.</p>
  
  <pre><code>String delims = "[?,\\[\\]]";
  </code></pre>
  
  <p>Now the results of splitting it using this code</p>
  
  <pre><code>String[] tokens = mapString.split(delims);
  </code></pre>
  
  <p>yields this result</p>
  
  <p>--><br>
  --><br>
  32<br>
  120<br>
  --><br>
  x1y1<br>
  --><br>
  object pieceP1<br>
  --><br>
  null<br></p>
  
  <p>where the arrows are the empty lines.</p>
  
  <p>How can I modify this regular expression so that there are no empty lines?</p>
  
  <p>Thank you greatly in advance.</p>
  
  <p>~ Selcuk</p>