From: Ævar Arnfjörð Bjarmason Date: Thu, 30 Sep 2010 19:03:31 +0000 (+0000) Subject: send-email: extract_valid_address use qr// regexes X-Git-Tag: v1.7.4-rc0~160^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=35b6ab955d2288e1c2671bde67298ed3abe32781;p=git.git send-email: extract_valid_address use qr// regexes Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 189040923..db17aae02 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -777,8 +777,8 @@ our ($message_id, %mail, $subject, $reply_to, $references, $message, sub extract_valid_address { my $address = shift; - my $local_part_regexp = '[^<>"\s@]+'; - my $domain_regexp = '[^.<>"\s@]+(?:\.[^.<>"\s@]+)+'; + my $local_part_regexp = qr/[^<>"\s@]+/; + my $domain_regexp = qr/[^.<>"\s@]+(?:\.[^.<>"\s@]+)+/; # check for a local address: return $address if ($address =~ /^($local_part_regexp)$/);