I want to get rid of all comments in a C# file using a TextPad regular expression, using the Find And Replace feature. I don't need one regular expression to do this. I don't mind making multiple passes.
Scenarios:
If C# source code line contains code, remove the white spaces and comments after the code. If the C# source code line(s) contains no actual code, remove the entire line(s).
x = y; /* comment on single line */
x = y; // comment on single line
x = y; /* comment on multiple lines
comment on multiple lines */
Are there any I'm missing?