summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16a4c6e)
raw | patch | inline | side by side (parent: 16a4c6e)
author | Horst H. von Brand <vonbrand@inf.utfsm.cl> | |
Sat, 3 Jun 2006 17:11:48 +0000 (13:11 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 4 Jun 2006 07:00:20 +0000 (00:00 -0700) |
- Fix the regular expressions for local addresses
- Fix the fallback regexp for non-local addresses, simplify the logic
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
- Fix the fallback regexp for non-local addresses, simplify the logic
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index ed1d89b3f73564715d0fe4061e87f63fea7e7be2..a7a77977787d1d1fcc98d9fa4dc745162d6fde04 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
my $address = shift;
# check for a local address:
- return $address if ($address =~ /^([\w\-]+)$/);
+ return $address if ($address =~ /^([\w\-.]+)$/);
if ($have_email_valid) {
return Email::Valid->address($address);
} else {
# less robust/correct than the monster regexp in Email::Valid,
# but still does a 99% job, and one less dependency
- my $cleaned_address;
- if ($address =~ /([^\"<>\s]+@[^<>\s]+)/) {
- $cleaned_address = $1;
- }
- return $cleaned_address;
+ $address =~ /([\w\-.]+@[\w\-.]+)/;
+ return $1;
}
}