Re: [RFC PATCH] git-send-email: Validate recipient_cmd (to-cmd, cc-cmd) addresses
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 20, 2011, 22:29 UTC
- Message-ID
- <BANLkTikuC1V1U-c0wyThOZAn6gVXr7S_cQ@mail.gmail.com>
- In-Reply-To
- <1303336253.24766.34.camel@Joe-Laptop>
On Wed, Apr 20, 2011 at 23:50, Joe Perches <joe@perches.com> wrote:
> + my ($recipient_name, $recipient_addr) = ($recipient =~ /^\s*(.*?)\s*(<[^>]+>)/);
In Perl you can write (<.*?>) instead of (<[^>]+>)
> + if ($recipient =~ /^\s*(.+\@\S*).*$/) {If this program doesn't have some extract_emails_from_string() function already it probably should.