Regexp tasks authors just love making tasks about e-mail addresses. We are not an exception.
Let's write a template matching an e-mail address. We'll consider the following format of valid e-mail addresses:
its first part can contain from 6 to 30 characters. These characters can contain lowercase Latin letters (
a-z), digits (0-9), hyphens-, dot characters., equal signs=or underscores_the second part that immediately follows the first one can be either
@gmail.com,@jetbrains.orgor@hyperskill.orgnote that other combinations of the correct domain and top-level domain names are invalid. For example,
@jetbrains.comor@gmail.orgshouldn't be accepted by your regex.
Put your regex in the template variable.
Some examples of valid e-mails: [email protected], [email protected], [email protected].
Some examples of invalid e-mails: mainadmin@gmail,com, [email protected], [email protected], [email protected].
Make use of the website allowing you to check your expression online to test them in a fast and easy manner.