My question is simple, I want to find all commented and blank lines in my source code and delete them. I’ve tried ^(REM [\d\D]*?[\r\n])|(?<SL>\'[\d\D]*?[\r\n])$ but it does not work.
Please help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If VS2008 supports zero-width lookaheads:
(?:\r\n[\t ]*[symbol_initiating_full_line_comment][^\r\n]*|\r\n[\t ]*)+(?=\r\n)If VS2008 does not support zero-width lookaheads:
(?:\r\n[\t ]*[symbol_initiating_full_line_comment][^\r\n]*|\r\n[\t ]*)+(\r\n)$1Answer assumes
$1is how VS2008 represents the first unnnamed group, some applications use\1.Further information:
*?is redundant, as*matches 0 or more, and?makes the previous symbol optional.