I Want to implement multiple email validation with specific domain using regex separated by ;. Requirement is to allow only two email id separated by semicolon.
I tried regex
^([\w+-.%]+@domain+\.com[~]?){1,2}$
it works fine but it validates email followed by ; . It should work as below
1) abc@domain.com valid
2) abc@domain.com;abc1@domain.com valid
3) abc@domain.com; invalid
4) abc@domain.com;abc1@domain.com; invalid
How to do it using regex?
No comments:
Post a Comment