title: Lost in translation - C# regex to JavaScript regex
body: <p>I'm having some trouble translating my working C# regular expression into JavaScript's regular expression implementation.</p>
  
  <p>Here's the regular expression:</p>
  
  <pre><code>([a-z]+)((\d+)([a-z]+))?,?
  </code></pre>
  
  <p>When used on <code>"water2cups,flour4cups,salt2teaspoon"</code> you should get:</p>
  
  <pre><code>[
      ["water", "2cups", "2", "cups"]
      ["flout", "4cups", "4", "cups"]
      ["salt", "2teaspoon", "2", "teaspoon"]
  ]
  </code></pre>
  
  <p>... And it does. In C#. But not in JavaScript.</p>
  
  <p>I know there are some minor differences across implementations. What am I missing to get this expression working in JavaScript?
  <br /><br />
  <strong>Update</strong></p>
  
  <p>I am using the regex like so:</p>
  
  <pre><code>"water2cups,flour4cups,salt2teaspoon".match(/([a-z]+)((\d+)([a-z]+))?,?/g);
  </code></pre>