Question

LLoyds Banking Group
GB
Last activity: 23 Jul 2019 10:38 EDT
Regex for email validation
Hi,
I am using the below regex for email validation in an edit validate rule.
String emailid = "[A-Za-z0-9_&-'$&]+(\\.[A-Za-z0-9_&-'$]+)*@[A-Za-z0-9_&-'$]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})";
It is working for _ and - but not for $&'. Can someone explain how to correct this behaviour?
Regards,
Manash
***Updated by moderator: Lochan to update platform capability***