Email Validation using Regex- Accepting all special characters except a few

Viewed 35

I am looking or a regex expression to validate an email with below requirements- Email should have the following parts- recepientname@domainnam.topleveldomainname

  • Recipient name - can contain all letters A-Z, all numbers 0-9 and any special character except the below ones.
  • Domain name - can contain all letters A-Z, all numbers 0-9 and any special character except the below ones.
  • Top-level domain name - can contain all letters A-Z, all numbers 0-9 and any special character except the below ones.

Special Characters to exclude-

!
+
=
 
$
;
%
~
> 
< 
?
DEL (Character)
^

I have also used the below expression, !pxContainsViaRegex(.Email,"[A-Za-z0-9#&'/?_{|}-]+(?:\\.[A-Za-z0-9#&'*/?_{|}-]+)@(?:A-Za-z0-9?\.)+A-Za-z0-9?",false)

0 Answers
Related