Using regular expressions with Visual Studio

Today, I began using regular expressions to change a whole bunch of code. However, what I learned from using RegEx in TextMate was not the same as in Visual Studio.

So, for example, the parenthesis around regular expressions to indicate a backreference in TextMate:
    (\w+)
is represented by curly braces in VS:
    {\w+}

And to get the backreference in TextMate, you would use the $:
    $1
but in VS, you would use a backslash:
    \1

Leave a Reply

Your email address will not be published. Required fields are marked *