Hi, trying to use OpenXmlRegex I started with the Example TextReplace01.cs, especially the replacement with pattern, because this is what I need. But:
// Replace content using replacement pattern (paragraph 18)
content = xDoc.Descendants(W.p).Skip(17).Take(1);
regex = new Regex($"({leftDoubleQuotationMarks})(video)({rightDoubleQuotationMarks})");
count = OpenXmlRegex.Replace(content, regex, "$1audio$3", null, true, "John Doe");
Console.WriteLine("Example #20 Replaced: {0}", count);
gives me paragraph 18 looking like this:
The first $1audio$3 is like the second $1audio$3 but not like the third ‘video’.
wich is obviously not what I have expected. Have I got something wrong?