We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Replace Text with paragraph breaks

Hi

Please show to replace text with paragraph breaks. I have attached a document with yellow a yellow highlighted block. How can I replace it? or any text with special characters.

The replace evaluator ignores any search pattern with these special characters

Cheers Bruce

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Unfortunately, you cannot replace text with special characters. An exception is thrown if a captured or replacement string contain one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.range.replace_overload_1.html

Best regards.

do you have list of what those special characters are?

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your question.

We don’t have such a list since the definition given in the article is enough in most cases. Replacement feature is normally used with regular text. I have looked the source code and here is what I found:

- inline picture (character with code 1);

- footnote reference (character with code 2);

- footnote separator (character with code 3);

- footnote continuation (character with code 4);

- annotation reference (character with code 5);

- end of a table cell or end of a table row (character with code 7 or ‘\a’);

- section break (character with code 12 or ‘\f’);

- paragraph break (character with code 13 or ‘\r’);

- field start (character with code 19);

- field separator (character with code 20);

- field end (character with code 21).

Note that page break and section break symbols are the same ‘\f’. The list is a part of “implementation details” that is subject to change in the future. If you plan somehow using this list in your code please ensure to provide reasonable fallbacks for possible changes.

Regards,