简体   繁体   English

使用PHP从preg_match进行preg_match

[英]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 问题是我无法获取url =和&_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. 我查看了源代码,它与浏览器自动转换的$ link输出不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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