<[EMAIL PROTECTED]> wrote : > Bertrand Mansion <[EMAIL PROTECTED]> wrote: > : > [snip] > : I have tried many times with no success. I can easily change > : the "Received:" header to be > : "From [EMAIL PROTECTED]:" but as there > : are more than one "Received:" header, they all get replaced, > : which is bad. > : > : I think I need a regex that would match "\n\nReceived:" and > : replace it with "\nFrom xxxxxx\nReceived:". It doesn't seem > : difficult but I am stuck. > : > : I hope someone can help me, I have tried to solve this for hours... > > > Can you show us what you have? It would make solving this > much easier.
Well, I don't have much, I am trying to do it from the command line: perl -pi -e "s/\n\nReceived:/\nFrom xxxxxxx\nReceived:/" file.txt The archive is 70Mb approx. I am testing on a smaller subset. This looks so simple and common that I am probably not taking the problem in the right way. Bertrand Mansion Mamasam -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>