While debugging code, I added a bunch of lines in the form of
System.out.println("DEBUG: (Some statement)");
System.out.println("DEBUG: (Some statement)" + (Some expression));
System.out.println("DEBUG: (Some statement)" + (Some expression) + "Some other text");
System.out.println("DEBUG: (Some statement)"
+ (Some expression)
+ "(Some other statement)");
System.out
.println("DEBUG: (Some statement)"
+ (Some expression)
+ "(Some other statement)");
where (Some expression)
and (some statement)
are expressions and statements respectively.
Now that I'm done debugging the code, I would like to be able to comment it out using find and replace, and to uncomment it later, if more bugs appear.
I have a regex that works for the single-line statements. (System.out.println("DEBUG:[^,]+"\n)
Is there a regex that works for the multiline statements?