title: Regex for hyphenated words
body: <p>I have hyphen separated words in paragraphs that I'm trying to extract.</p>
  
  <p>I've tried following regex <code>\w+-\w</code>, however this is not working as expected.</p>
  
  <p>Here's the complete code written in JavaScript.</p>
  
  <pre><code>var string = "time to eval-u-ate";
  var result = string.match(/\w+-\w/g); // ["eval-u"]
  </code></pre>
  
  <p>This returns the string <code>eval-u</code>. I want the result to be <code>eval-u-ate</code>. How can I modify the regex to match complete hyphenated words.</p>