I had to quickly remove single line comments from an Android project in Eclipse. I could not find any built in feature in Eclipse to do that. So I resorted to a simple regular expression:
(//[^\n]*)
This simple regex selects all the strings that begin with “//” and end with a new line. So all you have to do is use it in the find and replace option for a file or to apply to the whole project or multiple files do Search -> File. Also, make sure to select the “regular expression” check box.
This is something I did very quickly… so be careful since it might pick up some urls as well… like anything after the “//” part in “http://mysite.com/page.php”.
Quick and easy way to remove all single line (//) comments in Eclipse
Thank you so much. really fast and helpfull
thank you.
i am change regular expression.
([^:]//[^\n]*)
it’s pass “http://…”