Q:

Regex to get return the first two ints

Given a string like: #/projects/58/tasks/140
I want to be able to extract 58 & 140. 
I have the following:
parseInt(hash.match(/\d+/)[0]);

This gets 58, but I can't get 140 with: 
parseInt(hash.match(/\d+/)[1])

y? thanks

A:

Use "g" modifier
 hash.match(/\d+/g)

