Hi All,
We have a requirement to replace word 'ABC'(dummied) with 'XYZ'(dummied) in all the files. We have hundreds of aspx/ascx/cs/xml/xsl files which might contain the word.
The requirement is
- Do not replace word if it is part of NameSpace(eg ABC.A1.A2 should not be replaced) or variable names(var abc = "") or tags (abc:control).
- The word should be replaced only if it is a whole word( In my cs file, if I have a variable name same as the word i am looking for, it should not be replaced . If I have a string literal eg var str = " ABC is good product". It should be replaced in this case
This will be 1 time activity. How do I parse entire file for the given word and replace it if condition is satisfied? Planning to use Regex.
Any other ideas is really appreciated. Does a tool already exists that does this? I have tried to google but could not find such a tool.