From: Eric Wong <normalperson@yhbt.net>
To: Horst von Brand <vonbrand@inf.utfsm.cl>
Cc: Ryan Anderson <ryan@michonline.com>,
Nicolas Troncoso Carrere <ntroncos@alumnos.inf.utfsm.cl>,
git@vger.kernel.org
Subject: Re: [PATCH] git-send-email.perl extract_valid_address issue
Date: Mon, 29 May 2006 15:12:40 -0700 [thread overview]
Message-ID: <20060529221240.GE24077@localdomain> (raw)
In-Reply-To: <200605292109.k4TL9g7E014263@laptop11.inf.utfsm.cl>
Horst von Brand <vonbrand@inf.utfsm.cl> wrote:
> Fix regexps to better match email addresses if Email::Valid isn't present
> Make it return the address on match containing a @
>
> Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
> ---
> git-send-email.perl | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 312a4ea..6e39f2f 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -309,14 +309,14 @@ sub extract_valid_address {
> 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
> - return ($address =~ /([^\"<>\s]+@[^<>\s]+)/);
> + return ($address =~ /([\w\-.]+@[\w\-.]+)/) ? $1 : undef;
> }
> }
Oops on the original bug, my fault :x
Acked-by: Eric Wong <normalperson@yhbt.net>
--
Eric Wong
prev parent reply other threads:[~2006-05-29 22:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 4:00 [PATCH] git-send-email.perl extract_valid_address issue Nicolas Troncoso Carrere
2006-05-29 20:00 ` Ryan Anderson
2006-05-29 21:06 ` Horst von Brand
2006-05-29 21:09 ` Horst von Brand
2006-05-29 22:12 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060529221240.GE24077@localdomain \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=ntroncos@alumnos.inf.utfsm.cl \
--cc=ryan@michonline.com \
--cc=vonbrand@inf.utfsm.cl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).