Skip to Main Content

SQL & PL/SQL

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!

Need help to validate email addess using REGEXP_LIKE

1567114Oct 23 2018 — edited Oct 24 2018

Hello Gurus,

select * from test where

NOT REGEXP_LIKE (users, '^[A-Za-z]+[A-Za-z0-9.]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$'),',')

I need to validate the field which has valid email addresses so i am using the above statement.

But the problem is that if its a single email address its working but when email address delimited by comma its not working

The one below works fine

insert into  test

values ('abc   @xyz.com');

The one below does not works fine

insert into  test

values ('abc@xyz.com','sdf@test.com');

commit;

Please advise

This post has been answered by GregV on Oct 24 2018
Jump to Answer
Comments
Post Details
Added on Oct 23 2018
5 comments
4,713 views