I have several "placeholders" in my Word documents. In fact these placeholders are just simple words in the text that all look like this: <blablabla>.
Examples:
- <Name>
- <Street>
- <Zip_City>
My goal is to replace allof such placeholders with an empty string. Here is my current code:
- Code: Select all
var searchString = @"\<(.*?)\>";
var replaceString = string.Empty;
document.Replace(matchString: searchString, newValue: replaceString, caseSensitive: false, wholeWord: true);
Unfortunately, none of the placeholders gets replaced this way. Am I using a wrong regular expression? Or does Spire.Doc 5.6.75.4020 just not Support such scenarios?
Glad for any help!