Skip to content

Commit

Permalink
send-email: extract_valid_address use qr// regexes
Browse files Browse the repository at this point in the history
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Sep 30, 2010
1 parent 49f7385 commit 35b6ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,8 @@ sub expand_one_alias {

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)$/);
Expand Down

0 comments on commit 35b6ab9

Please sign in to comment.