String strEmail = 'test@test.com'; Boolean bValidateEmail = Pattern.matches('[a-zA-Z0-9._-]+@[a-zA-Z]+.[a-zA-Z]{2,4}[.]{0,1}[a-zA-Z]{0,2}', strEmail.trim()); System.debug('bValidateEmail ===> '+bValidateEmail);
No comments:
Post a Comment