I want to allow a single quote in email while doing the javascript email validation.
I have used the following code but it's working as expected.
var pattern = new RegExp(/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/);
return pattern.test(emailAddress);
Following emails it should return as valid
zoe.o’hara@test.com
natalie.o'sullivan@test.co.in