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!

Regular Expression to find special characters in string.

shiva887May 24 2021

Hello, i am lookin to find all entries in a table where the string consists of special characters. I've tried building the below pattern but not sure if it is the right approach.
SELECT 1 FROM dual WHERE regexp_like('CHRIS KAIZER, APS®, CoC® Chief Advisor', '.[^[:alnum:]]|[^[:space:]]|[^[:punct:]]');

So, any character other than alphanumerals, puntutation and space are to be considered as special characters. The particular trademark symbol in my example is not being categorized as alphanumeric where both the below queries are not returning results. Please can someone help in building the pattern.
SELECT 1 FROM dual WHERE regexp_like('®', '.[[:alnum:]]');
SELECT 1 FROM dual WHERE regexp_like('®', '.[^[:alnum:]]');

This post has been answered by User_H3J7U on May 25 2021
Jump to Answer
Comments
Post Details
Added on May 24 2021
6 comments
1,693 views