git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Joe PerchesNext: Joe Perches
Message 7 of 10 in “problem when using --cc-cmd”
  1. Thiago FarinaApr 17, 2011
  2. Jonathan NiederApr 19, 2011
  3. Joe PerchesApr 20, 2011
  4. Thiago FarinaApr 20, 2011
  5. Joe PerchesApr 20, 2011
  6. git-send-email: Validate recipient_cmd (to-cmd, cc-cmd) addressesJoe Perches, Apr 20, 2011
  7. Ævar Arnfjörð BjarmasonApr 20, 2011
  8. Joe PerchesApr 20, 2011
  9. Ævar Arnfjörð BjarmasonApr 20, 2011
  10. Joe PerchesApr 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.