Hi Jens,
Thank you for your interest in Syncfusion Products.
To replace the character in RegularExpression you can add one more escape character like the following code snippet.
string text = "Hello.[start]\r\ Line to remove.[end] Hello.";
string search = "\\[start\\](.*)\\[end\\]";
paragraph.AppendText(text);
Regex expr = new Regex(search);
int t1 = document.Replace(expr,"");
For more details, please have a look at following link.
http://websamples.syncfusion.com/samples/DocIO.Windows/ReplacingSample/main.htmI will update you with full details by tomorrow.
Regards,
Fathima Shalini.P
>Hi,
I am having trouble in removing text which include paragraphs with the Replace function in DocIO.
Example: (this works on a System.String)
string text = "Hello.[start]\r Line to remove.[end] Hello.";
string search = "\\[start\\](.*)\\[end\\]";
Regex expr = new Regex(search,RegexOptions.Singleline);
string t1 = expr.Replace(text, "");
===
t1 will be "Hello. Hello."
However if I try the same with a Word document I cannot figure out how to make a Regular expression which will remove the paragraph separator (\r in text).
Can anybody help?
Is this possible in some other manner?
Thanks
Jens