dos8244 2017-05-05 17:55
浏览 31
已采纳

preg_match来自preg_match使用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

  • 写回答

1条回答 默认 最新

  • dongmei8460 2017-05-05 18:01
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在
  • ¥15 前端echarts坐标轴问题
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码