title: Java split a string by space, new line, tab, punctuation
body: <p>everyone.</p>
  
  <p>I have a string like this</p>
  
  <pre><code>String message = "This is the new message or something like that, OK";
  </code></pre>
  
  <p>And I want to split it into array</p>
  
  <pre><code>String[] dic = {"this", "is", "the", "new", "message", "or", "something", "like", "that", "OK"};
  </code></pre>
  
  <p>I used</p>
  
  <pre><code>message = message.split("\\s+");
  </code></pre>
  
  <p>The problem was that it contained "that," not "that" like I want. Please teach my how to solve it. Thanks</p>