Javascript regex to parse human readable dates : <p>I have a dates in String in Javascript that could look like: </p>

<pre><code>1h
1h2m
1d3m4s
2d2h2m2s2ms
1ms
3s5ms
</code></pre>

<p>The indicators will not change, they are <code>d, h, m, s, ms</code></p>

<p>What would be a good regex to parse the numbers out:
for <code>3s5ms</code>, it should be:</p>

<pre><code>parsed = [0,0,0,3,5]
</code></pre>

<p>for <code>1d4m</code>, it should be:</p>

<pre><code>parsed = [1,0,4,0,0]
</code></pre>
