I have just cURL'd a page and am getting a javascript string returned. I would like to preg_match it so I can use the numbers in a PHP scrip开发者_运维知识库t. I am horrible at regex and have been trying all sorts of things for the last few hours to get it to work. I would appreciate any information you can send my way.
document.getElementById('vars').href = "/x/69402770/"+(592630%51245 + 592630%913)+" /";
Is the line that I'm getting via the cURL. I'd like to just get all the numbers into an array. 69402770, 592630, 51245, 592630, and 913.
Thanks again!
The expression below should yield an array with the 4 numbers
preg_match_all('/[0-9]+/', $yourJSString, $res);
print_r($res);
精彩评论