How to Delete Commented code througout the project in Android Studio
Step 1 : Press CTRL+SHIFT+R The below window will open
Step 2 : Inside Text in find put this.
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)
Note : The Above Regular Expression Deletes
Single Line Comments "//commented code"
Block Code Comments "/*commented code*/"
XML code Comments "<!-------Your comment----->"
Step 3 : Inside Replace with leave blank.
Step 4 : Check Regular Expression with Right mark and in context select in Comments
Step 5 : Inside Scope Select
Whole Project - To Remove Comments In Whole Project
Module - To remove only in Particular Module
Directory - To remove In Particular Directory
Step 6 : Click Find.
If you Have Any Query Please Comment Below or Drop a message in Chat Box.
Thank You
Happy Coding...:-)
Comments
Post a Comment