Strip comments but leave URI's which are in between ( and )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

I Have the following PREG.
I Want to remove comments from an file (Javascript or CSS), but i want to leave the URI's that are within an function.

So i thought to exclude any match which is between an ( and ).
But i can't seem to figure out exactly how.

I have the following atm:
	\/\*.*?\*\/|\/\/(?!(w)).*?([\r\n])|[\t]+

I now exclude any // comment with an w besides this, but that isn't the solution.

Is there some way to have it exclude it when it is between ( and )?

Thx in advanced.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux