Regex Used:
EMAIL_VALID_REGEX = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"+"[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$";
Now i need to allow apostrophe before @ and also it should not allow apostrophe as first and last character and also two consecutive apostrophe before @.
Can someone modify the above regex to handle the mentioned scenarios and can you explain it?
Valid emails: test@gmail.com, test's@gmail.com, t@gmail [Even if single character is passed before, it is valid] Invalid emails: 'test@gmail.com, test'@gmail.com, 'test'@gmail.com, test''s@gmail.com