php preg_replace去除html xml 注释

 

//不确定是否最优
$content = preg_replace('/<!--((?!-->).)*-->/s', '', $content);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-31
  • 2022-01-11
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案