【发布时间】:2018-09-17 23:57:03
【问题描述】:
我正在尝试使用 preg_replace 从数据库中通过 php 删除某些 css 样式中的注释代码。如果使用 srt_replace 或其他一些功能更好,请告诉我该怎么做。
我想删除以下注释的代码:
/*here is some commented code*/
background: #AAA;
/*here is some commented code*/
我上面代码的字符串在$spiderman中:
$ironman = preg_replace("//*(.*?)/*/Uis","",$spiderman);
我怎样才能让 $ironman 变得公正
background: #AAA;
感谢您的帮助。
【问题讨论】:
标签: php