unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: email extraction in emacs
Date: Thu, 30 Nov 2006 14:01:49 +0100	[thread overview]
Message-ID: <u64cxccle.fsf@gmail.com> (raw)
In-Reply-To: 1164819237.355277.217960@j72g2000cwa.googlegroups.com

"a" <ashish4112001@gmail.com> writes:

> if i have a text file filled with email addresses but other things
> as well what commands can i use to extract the email address from
> the file?

You would probably need `search-forward-regexp' and
`match-string'. The code below will not work but it will give you an
idea on how to do it:

(defun blah ()
 (let (adresses)
  (while (search-forward-regexp "\\(REGEXP-MATCHING-EMAILS\\)" nil t)
   (setq addresses (append adresses (list (match-string 1)))))
  adresses)

Matching e-mail addresses using a regexp can be tricky, if you want to
support all variants (with `+' before the @ and such).

  parent reply	other threads:[~2006-11-30 13:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 16:53 email extraction in emacs a
2006-11-29 17:45 ` Leo
2006-11-29 17:49 ` Peter Dyballa
2006-11-30 13:01 ` Mathias Dahl [this message]
2006-12-01  7:37   ` B. T. Raven
2006-12-01 12:20     ` Mathias Dahl
2006-11-30 19:54 ` martin

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u64cxccle.fsf@gmail.com \
    --to=brakjoller@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).