Hi everyone,
We use the below validation rule for email addresses. It works fine but it doesn't allow apostrophes. Unfortunately, I am not familiar with Regex Expression. How can I update it to allow apostrophe before @ like the following email address test'tst@gmail.com
NOT((REGEX(Email__c ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})')))
Thanks a lot!
2 respuestas
It gave Syntax error. Missing ')' when I added \\' but it worked with single dash \'
NOT((REGEX( Email__c ,'([a-zA-Z0-9_\\-\\.\']+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})')))
Really apprriciate @Keiji Otsubo. Thank you very much !