一段简单的正则,请教
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->$content = <<<html <ul class="small"> <li> <a href="/html5/tag_comment.asp" title="HTML 5"> <!--></a></li> <li> <a href="/html5/tag_doctype.asp"> <!DOCTYPE></a></li> html; $parr = "/href=\"\/html5\/(.*)\"/i"; preg_match_all($parr, $content, $result); var_dump($result);
'/<a.*?(?: |\\t|\\r|\\n)?href=[\'"]?(.+?)[\'"]?(?:(?: |\\t|\\r|\\n)+.*?)?>(.+?)<\/a.*?>/sim' <div class="clear"> </div>