procmail
[Top] [All Lists]

Re: Follow: Recipe woes

2003-06-01 12:50:51
On Sun, 1 Jun 2003, Professional Software Engineering wrote:


        | sed -e "s/domain1.net/spam-report-domain.com/gi" \
              -e "s/aaa.bbb.ccc.14/555.555.555.555/gi" \
              -e "s/aaa.bbb.ccc.12/555.555.555.555/gi" \
              -e "s/domain2.net/spam-report-domain.com/gi" \
              -e "s/domain3.com/spam-report-domain.com/gi" \

         -e 
"s/((domain1|domain2|domain3)\.com(domain4|domain5)\.net))/spam-report-domain.com/gi"

Is there anything wrong with the above regex?  I can't get it or even a 
more simple variant to work.

sed -e "s/(user1|user2)/spamreportuser/gi"

To test this I'm simply cating a file at the command line containing

user1
User1
user2
User2

through the above sed line.  It doesn't change anything; the output is the 
same as in the input.  I know that's the correct syntax for egrep, awk, 
and even Procmail.  Why isn't it working here?  This seems like a no 
brainer.  I must be missing something simple.  I've looked through my copy 
of the O'Reilly "Sed & Awk" book and can't find any sed examples that use 
the OR but I've found plenty of egrep and awk examples though.  I give.  
What simple mistake am I making?

Thanks
 Justin


_______________________________________________
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>