简体   繁体   中英

preg_match from preg_match using php

I have a problem in getting a match value.

I have this code

preg_match('/<meta property="og:image" content="(.*)" \/><meta property=/s', $result, $lq);
$link = (string) urldecode($lq[1]);
echo $link;
preg_match('/url=(.*?)&_nc_hash/u', $link, $final);
print_r($final);

the problem is I cant get the value between the url= and &_nc

Sorry guys, and thank you for commenting/reading my post I have now the answer

I view sourced it and it was different from the output of the $link that it automatically convert by the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM