[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: email extraction in emacs
From: |
Mathias Dahl |
Subject: |
Re: email extraction in emacs |
Date: |
Fri, 01 Dec 2006 13:20:20 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (windows-nt) |
"B. T. Raven" <ecinmn@alcisp.com> writes:
>> (defun blah ()
>> (let (adresses)
>> (while (search-forward-regexp "\\(REGEXP-MATCHING-EMAILS\\)" nil t)
>> (setq addresses (append adresses (list (match-string 1)))))
>> adresses)
>>
> This sort of works interactively, that is it finds most of them. Blah is
> missing a final parenthesis and I don't understand if addresses with 2 d's
> is outside the scope of the let or not. Anyway, it just returns a list of
> nils even if some email addresses are below the point of invocation in
> *scratch.
Yes, there were typos in the code. There should be only one variable,
`addresses'.
> \b[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]\{2,4\}\b
>
> Maybe all of the backslashes have to be doubled.
If they are in a string, yes.