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

453 thoughts on “Quick and easy way to remove all single line (//) comments in Eclipse

  • September 16, 2025 at 9:30 am
    Permalink

    ?????? ?????? https://business-yandex3.ru ???????? ???????, ??? ??????????? ? ???????. ??? ????????? ?????????? ????????, ????????? ???????? ? ???????? ????????????? ??????-???????????.

  • September 16, 2025 at 9:55 am
    Permalink

    ????? – ??? ???????????? ????????, ????????? ???????????????? ??????. ? ????????? ???????? ????????? ????????? ??????, ??????? ????? ?????? ?????? ????????. ?????? ????? ????? ????? ????????? ? ????????? ?? ???, ????? ???????? ????????????????? ?????? ??? ?????. ??????????? ???????? ??????? ????????? ? ????????? ??????? ???????????, ??????? ???????????? ??? ?????.?? ????? ????? ????? ???????????? ????????????? ?????????. ???????????? ?????? ????? ???????????? ??? ?????????????, ??? ????? ???? ? ????????? ???????? ? ?????????. ???????????? ?? ??????????? ??????? ???????? ? ???????? ? ??????? ??????????? ?????? ? ???????????? ?? ????????. ??????? ????????? ?? ??? ???????? ?? ????????? ? ???, ??? ???????????? ?? ??????????? – ??? ?????????? ???????. ???????????????? ?????? ? ????????? ???????? ??????? ??? ????????? ? ?????????? ?????.

Leave a Reply

Your email address will not be published. Required fields are marked *

*