How do you reference a capture group with regex find and replace in Visual Studio 2012, 2013, 2015, and VS Code

I realize there are a ton of questions about this, but none that I found specifically referenced which VS version they referred to. With that important information lacking, I still was unable to successfully use the answers I found. The most common was

  • Surround with {}, display capture with \1, \2, \n

However, that seems to be the old method of doing regex find and replace in Visual Studio, and it does not work in VS 2012.

4 Answers
4

Leave a Comment