Languages
[Edit]
EN

Java - validate email with regex

0 points
Created by:
jonrsharpe
436

In this article, we would like to show how to validate e-mail addresses in Java using regular expressions.

The important thing is that there is no single way to write expressions that validate an email. Some solutions are more precise in validation, others less.

Internet is filled with different solutions, so the main goal of the article is to gather all of them in one place.

Quick solution:

AngualrJS expression example

Edit

Google in AngualrJS suggested its own expression that checks e-mail.

Note: full source code is located here.

Regular expression:

Working example:

 Output: 

Merger articles

Edit
  1.  Java - validate email with regex
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join