正则表达式:从字符串中提取字符串模式

时间:2018-07-10 18:08:36

标签: php regex

要从字符串中提取模式“链接”:URL 。 示例:

$str = 'I like dogs and cats. View here "Link":http://www.example.com and here "Link":http://www.example2.com';
if (preg_match_all('/"Link":(.*?)/', $str, $match) >= 1) {
    print_r($match);
}

需要提取“链接”:http://www.example.com “链接”:http://www.example2.com

我在做什么错了?

0 个答案:

没有答案
相关问题