Monthly Archives: November 2007

Email Validation RegExp

I had to search my desktop files and email history for forty minutes before I turned this up: var rfc2822 = /^[\w!#$%&’*+/=?^`{|}~-]+(?:\.[\w!#$%&’*+/=?^`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])*)+\.(?:[a-z]{2,4}|museum|travel)$/i; That’s a JavaScript variable declaration, but the RegExp is valid for Perl and can be quickly translated for … Continue reading

Posted in JavaScript, Regular Expressions | 1 Comment