我有一个包含多个电子邮件的字符串,只需要从字符串中删除电子邮件地址。尝试使用regexp,但不确定如何保留其他文本,但只删除电子邮件
David Ram:DRAM@info.au,Seja:SEJA@info.au,Yogan:YSGAN@info.au
查询:
SELECT REGEXP_REPLACE(TEXTAREA,':[a-zA-z0-9.]@[a-zA-z0-9.]*' ) FROM CONTEXT
输出:
David Ram,Seja,Yogan
yqkkidmi1#
这里有一个选择:
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>
xv8emn3q2#
demo
SELECT REGEXP_REPLACE(TEXTAREA,':(.*?),',',' ) FROM (SELECT 'David Ram:DRAM@info.au,Seja:SEJA@info.au,Yogan:YSGAN@info.au'||',' TEXTAREA from dual)
2条答案
按热度按时间yqkkidmi1#
这里有一个选择:
xv8emn3q2#
demo