Thursday, August 10, 2006

Perl : Regular Expression to match an email address

Following regular expression matches a valid email address

/^(\w|\-|\_|\.)+\@((\w|\-|\_)+\.)+[a-zA-Z]{2,}$/

To learn more about regular expressions in Perl, read

man perlre

No comments: