Hello,
We have a problem about " wordDoc.Range.Replace(regex, feval, true); " code. In same two docs have same tags, but "correct.doc" doc find and replace this <@SKT> tag correctly. But "incorrect.doc" doc find without ">" character.
Therefore ; in replace function, "incorrect.doc" doc doesn't replace ">" character.
Our code:
DocumentBuilder builder = new DocumentBuilder(wordDoc);
Regex regex = new Regex("\\<@", RegexOptions.IgnoreCase);
FindEval feval = new FindEval();
wordDoc.Range.Replace(regex, feval, true);
foreach (Run run in feval.nodes)
{
if (!HasTag(tagList, run.Text))
{
tagList += run.Text+"|";
}
}
if (tagList != "") tagList = tagList.Substring(0, tagList.Length - 1);