Replacing multiple occurrences of |_|

Hi,

I needed to know if there is a way to replace multiple occurrences of | * | with TEXT.*

Ex:

I have a document that has the following lines:

Hi |||||
How are you |||

I need to replace both the instances (|||||, ||_|) with TEXT

Hello
Thanks for your request. I think in your case you can try using Replace method. Please see the following link to learn more:
https://reference.aspose.com/words/net/aspose.words/range/replace/
Also please see the following simple code:

Document doc = new Document("C:\\Temp\\in.docx");
doc.Range.Replace("|_|_|_|_|", "Andrey", false, false);
// Save output document.
doc.Save("C:\\Temp\\out.docx");

The input and the output documents are attached.
Best regards,