我想要寫在下面的PHP匹配條件的正則表達式:PHP正則表達式來移除特定CSS評論
/*
Remove this comment line 1
Remove this comment line 2
*/
.class1
{
background:#CCC url(images/bg.png);
}
.class2
{
color: #FFF;
background:#666 url(images/bg.png); /* DON'T remove this comment */
}
/* Remove this comment */
.class3
{
margin:2px;
color:#999;
background:#FFF; /* DON'T Remove this comment */
}
...etc
...etc
請任何人給我在PHP中的正則表達式。謝謝。
你爲什麼不刪除所有評論? – meotimdihia