【发布时间】:2011-06-03 00:07:38
【问题描述】:
即使在阅读了本教程http://www.webcheatsheet.com/php/regular_expressions.php
这是我需要找到的:
<link type="text/html" rel="alternate" href="http://link"/>
它应该返回:
http://link
这是我尝试过的:
$find = preg_match_all(
'/<link type="text/html" rel="alternate" href=".*',
$file,
$patterns2
);
你可以笑:)
提前感谢您的帮助和您的时间:)
【问题讨论】:
-
您确定没有收到有关缺少分隔符的错误消息吗?
标签: php regex preg-match-all