Skip to Main Content

Oracle Database Discussions

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:]]');

Comments
Post Details
Added on May 24 2021
1 comment
14,238 views