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

Free Support Forum - aspose.com

Please give a list of ASCII codes of what denotes "special or break characters"

I am currently working on a application using Aspose words, and we are doing a

Aspose.Words.Document.Range.Replace(findText, replaceText, false, false)


As you can see, we are using the replace call, and every once and a while we get the following error:

"The replace string cannot contain special or break characters."

Can you give a specified list of characters (IE their ASCII codes) that would fire this type of exception?

thanks!

This message was posted using Page2Forum from
Range.Replace Method (Regex, ReplaceEvaluator, Boolean) - Aspose.Words for .NET and Java

Hi

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

Thanks for your inquiry. An exception is thrown if a captured or replacement string contains one or more special characters: paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote.

Please see the following link to find ASCII codes:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.controlcharfields.html

Best regards,

– edit –

thanks for the link! I will see if this will help with my current situation.

thank you!

Hi,

The usr above does naot exist (anymore) and I want to know what the ascii value is for a section break so I can do a regex replace for " /f" with the section break character.

Thanks,

Ron

Hi Ron,


Thanks for your inquiry. In Aspose.Words, a SectionBreak is represented by ControlChar.SectionBreak and ControlChar.SectionBreakChar fields. The character representations of a section break are as follows:

  1. "\x000c"
  2. "\f"
  3. (char)12

I hope, this helps.

Best regards,