要从字符串中提取模式“链接”: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 。
我在做什么错了?