Check out example codes for "java regex email address validation". It will help you in understanding the concepts better.

Code Example 1

"^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?!-)(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"

Learn ReactJs, React Native from akashmittal.com