Email addresse basic validation

Q

How to perform a basic validation on email address using a regular expression? For example, "test+email@fexample.com" is an invalid email address.

✍: Guest

A

To perform a basic validation on email addresses, try this regular expression:

^\D\w+(\.\w+)*[@]\w+(\.\w+)*\.[a-zA-Z]{2,4}$

Click the button to test this regular expression here online:

2013-01-27, 5157👍, 0💬