How do I end all the comments of an HTML, CSS or JS document? Atom use

0

How can I delete all the comments in a document without having to go one by one eliminating? Could it be done with regular expressions?

    
asked by Jose Guerra WEB 14.08.2018 в 19:27
source

2 answers

0

In Atom, as you say you can use regular expressions using. * and then add:

(\/\*[\w\'\s\r\n\*]*\*\/)|(\/\/[\w\s\']*)|(\<![\-\-\s\w\>\/]*\>)

The expression will find all the comments and replace them with nothing.

Another way of not having to erase everything one by one would be to select the comment symbol of the language and go selecting them with Ctrl + D and delete all the selected lines with Ctrl + Shift + K

    
answered by 14.08.2018 в 19:39
0

In Atom press Ctrl + F to open the text search in a file, activate the Regex represented by this icon . * and in Find in current buffer write this:

answered by 14.08.2018 в 19:39