Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: Validating Input Email Address via regex

$
0
0

Hello Ganesh,

 

you want negative lookahead with alternation, like this:

 

.+@(?!clientabc\.com$|xyzclient\.com$).+

 

Please note, though, that the above regex does not provide any POSITIVE guarantee that the input is a valid SMTP address as specified by RFC2821.

 

It just provides a negative guarantee that the input is NOT an SMTP address from domains clientabc.com or xyzclient.com.

 

Best regards,

Lambert


Viewing all articles
Browse latest Browse all 9159

Trending Articles