正则替换link标签问题
$segname=<link href="css/content.css" rel="stylesheet" type="text/css" />
preg_replace( '/<link(.*?)[^>]*>/i', '', $segname );
替换失败,正则该如何写
[解决办法]
$segname='aa<link href="css/content.css" rel="stylesheet" type="text/css" />bb';echo preg_replace( '/<link(.*?)[^>]*>/i', '', $segname );