Showing posts with label ORA-12728. Show all posts
Showing posts with label ORA-12728. Show all posts

Wednesday, February 20, 2008

ORA-12728: invalid range in regular expression

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

This error can be seen when working with regular expressions and character lists.
ORA-12728: invalid range in regular expression
For a live simulation of this error, see Yocoya's Regular Expression Workbench.

While in this case it's easy to see that the character range is incorrect because letter c precedes letter a, whereas it should be written as [a-c], it can be harder to understand when multicharacter elements are present:

for instance, range [a-[.ch.]] is legitimate when NLS_SORT is set to XSPANISH, however range [[.ch.]-[.ll.]] is not.
For further details about NLS_SORT settings, see a previous posting.

Note also that you can put multiple character ranges inside lists as in [0-9a-z], however accented characters will not match.
If you need to include normal letters as well as their accented counterparts, use built-in character classes like [[:alnum:]] or [[:alpha:]].

See message translations for ORA-12728 and search additional resources

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles