Saturday, 17 August 2013

javascript str-match cannot use

javascript str-match cannot use

I need to parse url240 and url360 from a string. But i cant do it. On PHP
it is very easy:
preg_match('/&url240=(.*?)&/mis', $string, $C);
But I cant do it on javascript. My javascript code:
var str =
"&url240=http://cs506410v4.vk.me/u170785079/videos/d10bdfccf6.240.mp4&url360=http://cs506410v4.vk.me/u170785079/videos/d10bdfccf6.360.mp4&url480=";
var n=str.match(/url240=/gi);
alert(n);

No comments:

Post a Comment