17,377
社区成员
发帖
与我相关
我的任务
分享
with tmp as
(
select 'zb@qq.com' email from dual union all
select 'test@qq.com.cn' email from dual union all
select 'test@163.com' email from dual union all
select 'absss@qq.com' email from dual
)
select email
from tmp
where regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') = 'zb';
EMAIL
---------------------
zb@qq.com
with tmp as
(
select 'zb@qq.com' email from dual union all
select 'test@qq.com.cn' email from dual union all
select 'absss@qq.com' email from dual
)
select regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') result
from tmp;
RESULT
--------------
zb
test
absss
with tmp as
(
select 'zb@qq.com' email from dual union all
select 'test@qq.com.cn' email from dual union all
select 'absss@qq.com' email from dual
)
select regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') result
from tmp;
RESULT
-------zb
test
absss