Skip to content

Instantly share code, notes, and snippets.

@travisj
Forked from pete0emerson/email_template.pl
Created May 19, 2011 22:15
Show Gist options
  • Select an option

  • Save travisj/981919 to your computer and use it in GitHub Desktop.

Select an option

Save travisj/981919 to your computer and use it in GitHub Desktop.
Email regex template
#!/usr/bin/perl -w
use strict;
my @emails = qw/
petetheemersons.org
p
p@
p@t.
@
@t.e
@theemersons.org@
[email protected]
p@[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
/;
my $index = '1';
foreach my $email (@emails) {
printf("%2.0d ", $index);
if ($email =~ /REGEX/) {
print "PASS: $email\n";
} else {
print "FAIL: $email\n";
}
$index++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment