RegexSearchPatternException: character value in \\x{...} sequence is too large

I’m trying (again) to clean garbage characters from xml.

According to https://stackoverflow.com/questions/5742543/an-invalid-xml-character-unicode-0xc-was-found I can clean my xml with a pattern of

which should be

theRegex.searchpattern = "[^\\x{0009}\\x{000A}\\x{000D}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{10000}-\\x{10FFF}]+"

in Xojo. The search pattern works fine in RegexX but gives me the above exception when running in Xojo. What do I do wrong?

Xojo 2018r3, macOS 10.13.6.

Sounds like our plugin doesn’t like the 5 digit values.

Try inserting the actual characters into the pattern instead of the codes.

@Greg O’Lone: bug report or feature request?

@Kem Tekinay : shouldn’t RegexR report this error message, too? I’ll try to convert the characters.

I used the MBS plugin.