Visual Studio search and replace with regular expressions

by 1:42 AM 0 comments

So for the sake of removing all of this clutter here are some simple regular expression patterns to find and replace with empty string. First, to enable searching by regular expressions:

Search dialog
If you want to: Use regular expression:
Remove regions {[#]<region[^]*}|{[#]<endregion[^]*}
Remove comments [^]*//[^]*
Remove XML comments [^]*///[^]*
Remove empty lines {^:Wh}{$:Wh}

ravi tuwar


Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.


Post a Comment