procmail
[Top] [All Lists]

Re: formail problems

1997-06-25 00:09:00
On Tue, 24 Jun 1997 15:01:12 -0700 (PDT),
"Timothy F. Lee - Network Admin" <timlee(_at_)halcyon(_dot_)com> wrote:
     This still doesn't work properly.  I wanted to attempted to
extract just the login name.  The regular expression you have will extract
out everything prior to the @ sign, which includes full name and the less
than sign.  For example:

     era eriksson <era

was extracted from your mail.  I just want the login name, which is just
the "era" part of the From line.  Thanks much if you can help.

Works here, except that the negated class should also contain <>. Are
you sure you have both a tab and a space after the comma?

:0
* ^From:(.*\<)?\/[^@,       ]+@

This should be
    * ^From:(.*\<)?\/[^<>@,     ]+@

{                #   ^^^^^^^ this is one tab and one space

    # We needed the @ for the match, but now we want to pluck it off
    :0
    * MATCH ?? ^^\/[^(_at_)]+
    { }

    LOGIN=$MATCH
}

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: formail problems, era eriksson <=