$segname=<link href="css/content.css" rel="stylesheet" type="text/css" />
preg_replace( '/<link(.*?)[^>]*>/i', '', $segname );
替换失败,正则该如何写
------解决方案--------------------
- PHP code
$segname='aa<link href="css/content.css" rel="stylesheet" type="text/css" />bb'; echo preg_replace( '/<link(.*?)[^>]*>/i', '', $segname );