Quick Replace in Visual Studio 2010 fails to use Tagged Expression n

Posted by slomojo on Super User See other posts from Super User or by slomojo
Published on 2010-12-23T23:25:56Z Indexed on 2010/12/23 23:56 UTC
Read the original article Hit count: 196

Filed under:
|

I'm trying to do some basic regex Quick Replace operations in Visual Studio 2010, but when I use regex grouping I don't get Tagged Expressions (ie. \1 \2 etc.) returning their values, instead they are blank.

For example:

Text

int a = int.Parse("10");
int b = int.Parse("20");
int c = int.Parse("30");

Search Pattern (regex enabled)

int\.Parse\("([0-9]*)"\);

Replace

\1;

Replaced Text

int a = ;
int b = ;
int c = ;

© Super User or respective owner

Related posts about visual-studio-2010

Related posts about regex