First of all, I know that using regex for email is not recommended but I gotta test this out.
I have this regex:
\\b[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]
Try the below code for email is format of
jsmith@example.com
1st part -jsmith 2nd part -@example.com
-jsmith
-@example.com
1. In the 1 part it will allow 0-9,A-Z,dot sign(.),underscore sign(_) 2. In the 2 part it will allow A-Z, must be @ and . ^[a-zA-Z0-9_.]+@[a-zA-Z.]+?\.[a-zA-Z]{2,3}$