如何批量删除Java实体类中的注释?

图片说明

全是这种注释,如何能批量删除?

eclipse有没有批量删除的功能?

求大神解答!

图片说明 eclipse里面有替换的

好像没有该功能,注释不影响程序。

应该没有这功能,自己慢慢删吧。

Refer URL:http://stackoverflow.com/questions/24323383/remove-all-comments-in-java-files

Here are the regular expression used to find two types of comments

\/*([\S\s]+?)*\/ and (?s)/*.*?*/

(Search -> File Search) and paste one of the above reg-ex and check the Regular expression tick box on the right side. Now you can search and select "Replace All" to replace it with nothing typed in the second box.

楼上正解。也可以在linux下使用正则表达式和sed工具处理。