To comment lines with

Under “Replace”


Find what: ^\t+(<trace.*)
Replace with: <!-- \1 -->

add character to beginning of each line, even after tabs.
Find what: ^\t+
Replace with: anything

To remove lines containing a character/word


Find what: .*trace.*\r?\n
Replace with: Leave empty

References

https://gist.github.com/ramons03/6152802