Visual Studio Find/Replace Regular Expression Usage – CodeProject

If you ever work with auto-generated code, you would get tons of warnings like me. In those cases, search and replace a pattern is in-the-need, and regular-expression is quite handy at those situations!

For my situation, I need to covert the line in the form as below:

And change it to be:

The problem is I got hundreds of lines in this need-to-changed form (generated by the Unit Test Creating feature of VS). So, I use Replace All as below screenshot and get all things ordered! Oh yeah!

 

Here’s a good review about using the regular expression!

Visual Studio Find/Replace Regular Expression Usage – CodeProject.

Have fun! Life has lots of interesting stuff to learn & we can learn!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: