From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: How to extract the email address from the From: header? Date: Fri, 24 Oct 2014 13:37:31 -0700 Message-ID: <87vbn9yzjo.fsf@ericabrahamsen.net> References: <87bnp15jbm.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414182790 32541 80.91.229.3 (24 Oct 2014 20:33:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2014 20:33:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 22:33:03 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XhlXj-00026J-4R for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2014 22:33:03 +0200 Original-Received: from localhost ([::1]:50395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhlXi-0001wH-Ow for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2014 16:33:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhlXS-0001vx-BF for help-gnu-emacs@gnu.org; Fri, 24 Oct 2014 16:32:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhlXM-0003Br-9m for help-gnu-emacs@gnu.org; Fri, 24 Oct 2014 16:32:46 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhlXM-0003Bl-3J for help-gnu-emacs@gnu.org; Fri, 24 Oct 2014 16:32:40 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XhlXI-0001vI-Iy for help-gnu-emacs@gnu.org; Fri, 24 Oct 2014 22:32:36 +0200 Original-Received: from c-76-28-195-250.hsd1.wa.comcast.net ([76.28.195.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Oct 2014 22:32:36 +0200 Original-Received: from eric by c-76-28-195-250.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Oct 2014 22:32:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 16 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-76-28-195-250.hsd1.wa.comcast.net User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:gRfp5cabXaI3fhVR/x/Varm8tLU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100598 Archived-At: Marcin Borkowski writes: > Hi list, > > "From" headers (or "To" ones, for that matter) are sometimes plain email > addresses and sometimes strings of the form "Real Name > ". I could write a function (or maybe even a regex) to > extract the email part in the latter case, but Emacs being Emacs, I'm > pretty sure something like that already exists. Am I right? Check `gnus-extract-address-components', which claims to be a simpler/faster version of `mail-extract-address-components', which also see. Eric