在php里面,有这样的代码
new flashlibraryactivate( 'http://i.dell.com/images/global/banner_engine/bannerengine2.swf?xmlpath=images%2fglobal%2fbrand%2fbillboard%2fxml%2fjp%2fbanner_jajp.xml&bannerpath=images%2fglobal%2fbrand%2fbillboard%2f930%2fja%2f','930','380','#ffffff','8',alternatemarkup73c952c41cef4af2a31d9b7c3c34c253,'','flashid_43790a39d7b5497a81b4256bcc53730e','high','noscale','true','opaque','false','');
我想用正则过滤掉所有
new ****(******);这种形式的代码,请问怎么做?
请高人指导
------解决方案--------------------
echo preg_replace('/new[^(]+\(.*?\)/is','',$s);
------解决方案--------------------
^ 在[]里面表示非 的意思。
[^(]+ 匹配非 ( 号 1次或多次
\( 匹配括号
