I was trying to remove all comments and empty lines in a file with the help of a macro. Now I came up with this solution which deletes the comments(there is some bug descri
Delete the comments first using this regex
'+\s*(\W|\w).+
'+ - one or more ' for the beginning of each comment.
\s* - if there are spaces after the comment.
(\W|\w).+ - anything that follows except for line terminators.
Then remove the blank lines left using the regex Mr. Alan Moore provided.