Replace text in a file using sed on windows
问题 I am trying to replace a string in a .ism file using the SED command but it is failing for me. The line in the file is the product version which I want to change in every build. <row><td>ProductVersion</td><td>1.0.0</td><td/></row> And here is the command I'm trying: c:\rt_cygwin\bin\sed -i -r "s/ProductVersion\\"+[0-9].+[0-9].+[0-9] /ProductVersion\"1.0.%BUILD_NUMBER%/" "D:\lm.ism" Thanks 回答1: c:\rt_cygwin\bin\sed -i -r "s/ProductVersion</td>[0-9].[0-9].[0-9]/ProductVersion 1.0.%BUILD_NUMBER