title: Issue with JS regular expression
body: <p>I'm trying to create a regular expression in order to check some text inserted in a <code>textarea</code>. Basically, when typing I check the number of words inserted. As special chars, only commas and full stop are allowed.</p>
  
  <p>The problem is, for example, when I type <code>word,anotherword</code> my regex recognises only one word instead of two. I cannot find a good regex for it.</p>
  
  <p>My current regex is:</p>
  
  <pre><code>val.match(/\S+[A-Za-z]/g 
  </code></pre>
  
  <p>What shall I add? Thanks a lot!</p>