Chinaunix's Archiver
论坛
›
PHP
› 求正则表达式删除php文件头和尾的注释
eremiter
发表于 2015-07-13 13:28
求正则表达式删除php文件头和尾的注释
求正则表达式删除php文件前部份和尾部分的注释,中间的注释不能删除,只删除php文件头尾的注释
开头形如下,有两种,行数不固定
<?php
[*]<?php
[*]//
[*]//
[*]//
[*]<?php
[*]#
[*]#
[*]#
结尾也有两种,行数也不固定
[*]#
[*]#
[*]?>
[*]//
[*]//
[*]?>
页:
[1]
查看完整版本:
求正则表达式删除php文件头和尾的注释