From: Dan Kogai Date: Tue, 24 Mar 2009 17:51:01 +0000 (-0500) Subject: Fix for regular expressions for RFC2822. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f63574e655f386b13267d58419ef322ca7e3f5d;p=p5sagit%2Fp5-mst-13.2.git Fix for regular expressions for RFC2822. --- diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index 609f898..8ac3d0e 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -433,7 +433,8 @@ This I matches the address itself: my $dot_atom = qr{$atom(?:\.$atom)*}; my $quoted = qr{"(?:\\[^\r\n]|[^\\"])*"}; my $local = qr{(?:$dot_atom|$quoted)}; - my $domain_lit = qr{\[(?:\\\S|[\x21-\x5a\x5e-\x7e])*\]}; + my $quotedpair = qr{\\[\x00-\x09\x0B-\x0c\x0e-\x7e]}; + my $domain_lit = qr{\[(?:$quotedpair|[\x21-\x5a\x5e-\x7e])*\]}; my $domain = qr{(?:$dot_atom|$domain_lit)}; my $addr_spec = qr{$local\@$domain};