$seg="aasdfsdfsdf/*****aaaaaaaaaaaaaaaaaaaaaaa*/bbbbbbbbbbbbbbbbbbbbbbbbbbbbb/*ccccccccccccccccccccccc****/";
echo preg_replace("/\/*.+*\//s",'',$seg);
期望得到的结果是:
aasdfsdfsdfbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
实际却是aasdfsdfsdf
请问怎么做呢?谢谢各位大侠了
移除注释的正则是这个,自己改成php的
/\*[\s\S]+?\*/