doc.Range.Replace(new Regex("{{57}}"), “N/A”);
I’m trying to replace some strings in my doc.
Some of them work, others don’t and I dont know the reason.
For example:
I want to replace “{{57A}}” with N/A
So I do:
doc.Range.Replace(new Regex("{{57[A-I]}}"), “N/A”);
And it works.
Now, I want to replace “{{57}}” with N/A in addition to the previous rule.
So I do:
doc.Range.Replace(new Regex("{{57}}|{{57[A-I]}}"), “N/A”);
And this works partially. It does the replacements for {{57[A-I]}} but not for {{57}}
Am I doing something wrong??