send-email: a bit more careful domain regexp.
authorJunio C Hamano <junkio@cox.net>
Tue, 6 Jun 2006 21:12:46 +0000 (14:12 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 6 Jun 2006 21:12:46 +0000 (14:12 -0700)
This tightens the regexp a bit to make sure there is no double dots.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl
index 700d0c3e1506599b12fd8093021066314e1c0e8d..7b1cca70abcfcbf12c171c91d3f71ad4e43b0474 100755 (executable)
@@ -313,7 +313,7 @@ sub expand_aliases {
 sub extract_valid_address {
        my $address = shift;
        my $local_part_regexp = '[^<>"\s@]+';
-       my $domain_regexp = '[^.<>"\s@]+\.[^<>"\s@]+';
+       my $domain_regexp = '[^.<>"\s@]+(?:\.[^.<>"\s@]+)+';
 
        # check for a local address:
        return $address if ($address =~ /^($local_part_regexp)$/);