Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

regexp_replace and equivalence classes

23650Jun 20 2007 — edited Jun 21 2007

I am finally making my first leap into regular expressions. I've read the good tutorials posted here and other places but am struggling with how to convert extended characters into their base letter equivalents.

The requirement is to process a string as follows:

  1. Convert to uppercase

  2. Convert extended characters to base letter equivalents using this mapping:

ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ
AAAAAAACEEEEIIIINOOOOOUUUUY
  1. Remove any characters other than A-Z, 0-9, and space.

So, the string:

10. Chëur «Die Katze lässt das Mausen nicht»

would be converted to:

10 CHEUR DIE KATZE LASST DAS MAUSEN NICHT
with t as (select '10. Chëur «Die Katze lässt das Mausen nicht»' string from dual)
  select string, regexp_replace(string, ???, ???)
   from t;

Thanks for any help on this.

-Todd

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2007
Added on Jun 20 2007
5 comments
531 views