我有这样的HTML标签:警告:的preg_match()[function.preg匹配]:未知的修饰词 '('
<div class="title">Copy me if you can</div>
所以我想使用的preg_match采取 只是 “如果你可以复制我”我使用这个模式浸渍:
$preg = "<div class=\"title\">(.+?)</div>";
所以我写了这个代码
$match = preg_match($preg,$content);
浏览器输出:
Warning: preg_match() [function.preg-match]: Unknown modifier '('
什么
http://stackoverflow.com/questions/1531456/is-there-a-php-function-that-can-escape-正则表达式模式在他们被应用之前 – zloctb 2015-10-27 11:19:52