Regexp-Common-Email-Address-1.01/0000755000076500000000000000000010167260576017000 5ustar cwestwheel00000000000000Regexp-Common-Email-Address-1.01/Changes0000644000076500000000000000005210167110764020261 0ustar cwestwheel000000000000001.01 2005-01-05 - Initial version. Regexp-Common-Email-Address-1.01/lib/0000755000076500000000000000000010167260576017546 5ustar cwestwheel00000000000000Regexp-Common-Email-Address-1.01/lib/Regexp/0000755000076500000000000000000010167260576021000 5ustar cwestwheel00000000000000Regexp-Common-Email-Address-1.01/lib/Regexp/Common/0000755000076500000000000000000010167260576022230 5ustar cwestwheel00000000000000Regexp-Common-Email-Address-1.01/lib/Regexp/Common/Email/0000755000076500000000000000000010167260576023257 5ustar cwestwheel00000000000000Regexp-Common-Email-Address-1.01/lib/Regexp/Common/Email/Address.pm0000644000076500000000000000250710167261342025176 0ustar cwestwheel00000000000000package Regexp::Common::Email::Address; # $Id: Address.pm,v 1.1 2005/01/06 16:10:10 cwest Exp $ use strict; use vars qw[$VERSION]; $VERSION = sprintf "%d.%02d", split m/\./, (qw$Revision: 1.1 $)[1]; use Regexp::Common qw[pattern]; use Email::Address; pattern name => [qw[Email Address]], create => qq[(?k:$Email::Address::mailbox)]; 1; __END__ =head1 NAME Regexp::Common::Email::Address - Returns a pattern for Email Addresses =head1 SYNOPSIS use Regexp::Common qw[Email::Address]; use Email::Address; while (<>) { my (@found) = /($RE{Email}{Address})/g; my (@addrs) = map $_->address, Email::Address->parse("@found"); print "X-Addresses: ", join(", ", @addrs), "\n"; } =head1 DESCRIPTION =head2 C<$RE{Email}{Address}> Provides a regex to match email addresses as defined by RFC 2822. Under C<{-keep}>, the entire match is kept as C<$1>. If you want to parse that further then pass it to C<< Email::Address->parse() >>. Don't worry, it's fast. =head1 SEE ALSO L, L, L. =head1 AUTHOR Casey West, >. =head1 COPYRIGHT Copyright (c) 2005 Casey West. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Regexp-Common-Email-Address-1.01/Makefile.PL0000644000076500000000000000111010167110746020734 0ustar cwestwheel00000000000000use ExtUtils::MakeMaker; WriteMakefile ( AUTHOR => 'Casey West ', ABSTRACT => "Returns a pattern for Email Addresses", NAME => 'Regexp::Common::Email::Address', PREREQ_PM => { 'Email::Address' => '1.80', 'Regexp::Common' => '2.119', 'Test::More' => '0.47', }, VERSION_FROM => 'lib/Regexp/Common/Email/Address.pm', ); Regexp-Common-Email-Address-1.01/MANIFEST0000644000076500000000000000015610167111133020113 0ustar cwestwheel00000000000000Changes lib/Regexp/Common/Email/Address.pm Makefile.PL MANIFEST This list of files META.yml README t/test.t Regexp-Common-Email-Address-1.01/META.yml0000644000076500000000000000071310167111064020235 0ustar cwestwheel00000000000000# http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Regexp-Common-Email-Address version: 1.01 version_from: lib/Regexp/Common/Email/Address.pm installdirs: site requires: Email::Address: 1.80 Regexp::Common: 2.119 Test::More: 0.47 distribution_type: module generated_by: ExtUtils::MakeMaker version 6.24 Regexp-Common-Email-Address-1.01/README0000644000076500000000000000173410167111110017640 0ustar cwestwheel00000000000000NAME Regexp::Common::Email::Address - Returns a pattern for Email Addresses SYNOPSIS use Regexp::Common qw[Email::Address]; use Email::Address; while (<>) { my (@found) = /($RE{Email}{Address})/g; my (@addrs) = map $_->address, Email::Address->parse("@found"); print "X-Addresses: ", join(", ", @addrs), "\n"; } DESCRIPTION $RE{Email}{Address} Provides a regex to match email addresses as defined by RFC 2822. Under "{-keep}", the entire match is kept as $1. If you want to parse that further then pass it to "Email::Address->parse()". Don't worry, it's fast. SEE ALSO Email::Address, Regexp::Common, perl. AUTHOR Casey West, . COPYRIGHT Copyright (c) 2005 Casey West. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Regexp-Common-Email-Address-1.01/t/0000755000076500000000000000000010167260576017243 5ustar cwestwheel00000000000000Regexp-Common-Email-Address-1.01/t/test.t0000644000076500000000000000110710167110632020371 0ustar cwestwheel00000000000000use Test::More tests => 7; use strict; $^W = 1; BEGIN { use_ok 'Regexp::Common', 'Email::Address' }; use_ok 'Email::Address'; my $valid = q[Casey West ]; my $invalid = q[@bar.com]; ok $valid =~ /$RE{Email}{Address}/, 'valid is valid'; ok !($invalid =~ /$RE{Email}{Address}/), 'invalid is invalid'; $valid =~ /$RE{Email}{Address}{-keep}/; is $1, $valid, 'matches is the same'; my ($address) = Email::Address->parse($1); is $address->phrase, 'Casey West', 'parsed address returned'; is $address->address, 'casey@geeknest.com', 'parsed address returned';