IDEA development tool to remove the code comments

IDEA development tool to remove the code comments

Remove Comment

Some places there will be demand, sometimes we want to remove all comments of our own code, whether it is for any reason there is always a demand in this area, so based on our development tools IDEA how do we remove our comments yet.
First, open a we need to remove the project, for example, now we open my bg-admin-web-core this project
Here Insert Picture Description
I now want to delete all the comments in the code inside, we can do this, first click navigate to the location you want to delete a directory, For example, we currently need to remove all comments java directory under, then we can click on Edit => Find => Replace in Path ...
Here Insert Picture Description
and then we will see the following page:
Here Insert Picture Description
then we enter the following positive on the first search box is expressed type, remember to first move your mouse over the case when the input current settings on the Match Regex the query is positive:

(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/|[ \t]*//.*)

Then we can see that match the regular data we want to remove as follows:
Here Insert Picture Description
Finally, we click on the bottom of the Replace All to delete all of us can achieve a comment

Published 128 original articles · won praise 72 · Views 1.13 million +

Guess you like

Origin blog.csdn.net/linzhefeng89/article/details/97126223