Hi All,
How can i check if a certain word exists in a value in regular expression ?
I have an attribute called Race. Race can contain the following:
White, Non-Hispanic
Black, Non-Hispanic
White, Non Hispanic
Black, Non Hispanic
White, NonHispanic
Non-Hispanic, white
Non Hispanic - black
What i want is to check if my value contains the word "NON" (NON can be at the beginning, middle or end), if it does, parse it and return it.
This is what I have, however I want to make sure it covers all cases and not missing anything else
select REGEXP_SUBSTR(UPPER(trim('Black, Non-Hispanic')), '[NON]+') from dual;
Thanks in advance.