procmail
[Top] [All Lists]

Re: REGULAR EXPRESSION NEEDED FOR A PROCMAIL RECIPE

2001-03-19 03:28:21
From: S M <shwetagm(_at_)yahoo(_dot_)com>

HELLO ALL     

I need a regular expression to get the user name from
the email id, ie someone(_at_)abc(_dot_)net,i need to write a
regular expression to extract the username "someone"
from someone(_at_)abc(_dot_)net(_dot_)

can anyone give me a lead?

Here's what I do:

  ## Find Sender and store value in FROM
  FROM = `formail -zrx To:`

  :0
  * FROM ?? ^^\/[^(_at_)]+
  { LOCALNAME = $MATCH }


-- 
Netcom has imploded.  Please now use NOTnetcom.com for mail.
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ex-Netcommies:  Mail "forwards" for free forwarding service!
NOT affiliated with EarthLink, Inc.'s Netcom brand identity.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>