News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tiffany Brown's Blog:
A better RegEx pattern for matching e-mail addresses
December 13, 2006 @ 08:15:00

Though not specifically related to PHP, I wanted to share a helpful tip that Tiffany Brown has posted to her blog today - a nice, compact regular expression to handle the matching of email addresses.

A few weeks ago, I posted a regular expression pattern < href="http://tiffanybbrown.com/2006/11/09/a-pattern-for-matching-e-mail-addresses/">for matching e-mail addresses. Below is a more refined version:

^[-+.w]{1,64}@[-.w]{1,64}.[-.w]{2,6}$

Not only does it match the traditional email address formats, but it also will match addresses with periods in the name, British domains, and new TLDs like '.travel' or '.museum'.

0 comments voice your opinion now!
regular expression match email address refined regular expression match email address refined


blog comments powered by Disqus

Similar Posts

Noupe.com: 10 AJAX-based, PHP WebMail Clients For a Great User Experience

Zoomzum Blog: 10 Powerful PHP Regular Expression For Developers

VulgarisOverIP: Send email with PHP and GMail hosted for your domain

Northclick Blog: Getting the PHP fatal errors

The Bakery: Five New Posts - Custom Views, CSS, ViewInFile, ActsAs and Email Validation


Community Events





Don't see your event here?
Let us know!


configure framework interview threedevsandamaybe opinion unittest api list language laravel composer conference community introduction voicesoftheelephpant version series symfony release podcast

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework