title: use of delimiter function from scanner for "abc-def"
body: <p>I'm currently trying to filter a text-file which contains words that are separated with a "-". I want to count the words.</p>
  
  <pre><code>scanner.useDelimiter(("[.,:;()?!\" \t\n\r]+"));
  </code></pre>
  
  <p>The problem which occurs simply is: words that contain a "-" will get separated and counted for being two words. So just escaping with \- isn't the solution of choice.</p>
  
  <p>How can I change the delimiter-expression, so that words like "foo-bar" will stay, but the "-" alone will be filtered out and ignored?</p>
  
  <p>Thanks ;)</p>