【发布时间】:2016-02-18 11:55:02
【问题描述】:
例如,我们有一些这样的文本:
// comments
someFunc.f.log({
obj:obj,
other:other
});
console.log('here');
someFunc.f.log({
obj:obj,
other:other
}
);
console.log('here');
// comments
我想从这个文本中删除 someFunc.f.log(); PHP后端和输出中的函数get:
// comments
console.log('here');
console.log('here');
// comments
我们如何才能达到这一点?
【问题讨论】:
-
有嵌套括号吗?否则你可以试试something like this。
-
塔安克斯!!!此时不是。但也许您可以针对这种情况提供解决方案?
标签: php regex replace preg-replace strip