Backslash inserted before dot in replacement text

Apr 3, 2014 at 9:34 AM
Edited Apr 3, 2014 at 9:38 AM
I am searching for the regular expression:
<TargetFrameworkVersion>v[24].0</TargetFrameworkVersion>
and trying to replace it with a line set from a batch file.

This works fine in the GUI but from the command line there is a backslash inserted after the number, so for example with replacement text of:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
the result is:
<TargetFrameworkVersion>v4\.0</TargetFrameworkVersion>
If I try to quote the dot in the replacement with backslash I get three slashes in the result

Here is the command line used:
"C:\tools\fnr.exe" --cl --dir "C:\Test" --fileMask "TestProj.vbproj" --useRegEx --find "<TargetFrameworkVersion>v[24].0</TargetFrameworkVersion>" --replace "<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>"
Apr 22, 2014 at 11:04 AM
Edited Apr 22, 2014 at 11:04 AM
if using regEx, it appears the replace is escaped automatically (for reg ex chars), unless you pass the parameter --useEscapeChars
Coordinator
May 6, 2014 at 10:04 AM
Hi,

Thank you for reporting this issue.

It is now fixed in version "1.7 BETA":
https://findandreplace.codeplex.com/releases/view/121804

Eric