【发布时间】:2011-07-20 10:22:56
【问题描述】:
模式是这样的
/* comment [comment goes here] */
/* comment please do not delete the lines below */
[I am a special line so I should not be changed ]
/* comment please do not delete the line above */
我想删除评论块,但不是寻找/**/,而是希望评论为/* comment [] */,其中[] 是实际评论。
这是为了避免任何应该包含 cmets 的文本。
所以这里是评论的条件
- 以 =>>
/* comment开头 - 接着 =>> 任何东西
- 随后是 =>>
*/
【问题讨论】:
-
你尝试了多远?
-
我已经尝试了一些东西,我的正则表达式知识是=看着一只猴子试图弄清楚他的反射是什么
标签: php preg-replace comments