Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.
The following code shall remove all comments
const string code = @" Option explicit 'comment sub t dim X 'comment with cont _ inuation _ end of comment X = ""It's mine!"" ' inside "" is not a comment designation end sub ";
The result shall be as follows:
Console.WriteLine(Regex(code,<pattern I am asking about>,<null or $1 or what?>))
I expect something working (a little bit) better than my:
Option explicit sub t dim X X = "It's mine!" end sub
Join the community of 500,000 technology professionals and ask your questions.