if ((urlStr.indexOf('t='))!=-1)
{
var pat = /t=(\d+)m(\d+)s/;
pat.exec(urlStr);
alert (RegExp.$1);
alert (RegExp.$2);
}
case 1: http://localhost/proc1/commit.php&t=1m13s
Returns 1 and 13 -> Okay
case 2: http://localhost/proc1/commit.php&t=13s
Returns blank and blank -> Not okay
Expected Result 0 and 13
How do I have to change my regex?