Regexp::Common::Email::Address - Returns a pattern for Email Addresses


Regexp-Common-Email-Address documentation Contained in the Regexp-Common-Email-Address distribution.

Index


Code Index:

NAME

Top

Regexp::Common::Email::Address - Returns a pattern for Email Addresses

SYNOPSIS

Top

  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

Top

$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

Top

Email::Address, Regexp::Common, perl.

AUTHOR

Top

Casey West, <casey@geeknest.com>.

COPYRIGHT

Top


Regexp-Common-Email-Address documentation Contained in the Regexp-Common-Email-Address distribution.

package 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__