title: Extract words starting with a particular character from a string
body: <p>I got the following string:</p>
  
  <pre><code> String line = "#food was testy. #drink lots of. #night was fab. #three #four";
  </code></pre>
  
  <p>I want to take <code>#food</code> <code>#drink</code> <code>#night</code> <code>#three</code> and <code>#four</code> from it.</p>
  
  <p>I tried this code:</p>
  
  <pre><code>    String[] words = line.split("#");
      for (String word: words) {
          System.out.println(word);
      }
  </code></pre>
  
  <p>But it gives <code>food was testy</code>, <code>drink lots of</code>, <code>nigth was fab</code>, <code>three</code> and <code>four</code>.</p>