Javascript regex help to split a string into Days, Hours, Minutes ("s" or no "s")
<p>I have a string</p>

<pre><code>var str = "2 Days, 2 Hours 10 Minutes";
</code></pre>

<p>if I :</p>

<pre><code>str.split(/Days/);
</code></pre>

<p>I get:</p>

<pre><code>["2 ", ", 2 Hours 10 Minutes"]
</code></pre>

<p>So I think I can use string.split to split out my string and get the "days", "hours" and "minutes" with this method.</p>

<p>However, what do I do when I sometimes have "s" or no "s", for example:</p>

<pre><code>var str = "1 Day, 2 Hours 10 Minutes";
</code></pre>

<p>Here my string is "1 Day" not "2 Days" so I don't have the "s" on the "day" value. Is there a way to split a string on </p>

<pre><code>Day(s)
Hour(s)
Minute(s)
</code></pre>
