« Common garbage collection problems and how they are reflected in the views | Main | The Era of the Free Books »

Checking the validity of an e-mail address

This is something that, sooner or later, we all have to do. For checking the validity of an e-mail address, the following expression can be used:
^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$
In this article you will find usage examples in PHP 4.3, JavaScript and C# 1.1.

PHP

JavaScript

C#