Search and replace regular expressions group VS2017

Sometimes you write some codes and then you find your self want to change a suffix or prefix in your codes or classes names or namespaces

I will show with an example how to do it.

 let us supposed we need to change the following "Manager" sub-string into the class name
public interface IParticipantImageManager
in visual studio click on ctrl + shift + H use any website to test your regular expression, personally I use regex101 to write the right expression and the replace it.


to find the string
IParticipantImage(\w+)
and to replace the sting
IParticipantImage$1

Comments