I have a string with multiple email and need to only remove the email address from the string. Tried using the regexp but not exactly sure how to keep the other text but only remove the emails
David Ram:DRAM@info.au,Seja:SEJA@info.au,Yogan:YSGAN@info.au
Query:
SELECT REGEXP_REPLACE(TEXTAREA,':[a-zA-z0-9.]@[a-zA-z0-9.]*' ) FROM CONTEXT
Output:
David Ram,Seja,Yogan
Here's one option:
SQL> with test(col) as
2 (select 'David Ram:DRAM@info.au,Seja:SEJA@info.au,Yogan:YSGAN@info.au' from dual)
3 select regexp_replace(col, ':\w+@\w+\.\w+') result
4 from test;
RESULT
--------------------
David Ram,Seja,Yogan
SQL>