Search worked but replace with same parameter found nothing to replace
A powerful and fast search tool using regular expressions
Brought to you by:
steveking
So I was trying to find and replace a large number of strings in Visual Studio project files. Filterd file names on <star>proj.
Search text was : <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
Replace text was : <TargetFrameworkVersion>$(MyTargetFramework)</TargetFrameworkVersion>
When I would search, it would find over 1,000 results. When I hit replace, it found 0 results and nothing was replaced. Not sure what might cause this.
When replacing, the$ char is special in regex lingo.
You have to escape it:
<TargetFrameworkVersion>\$(MyTargetFramework)</TargetFrameworkVersion>