regexp matching question
Rick Delaney
rick-h4KjNK7Mzas at public.gmane.org
Thu Oct 6 00:30:02 UTC 2005
On Thu, Oct 06, 2005 at 12:27:16AM +0300, Peter wrote:
>
> I was trying to make sense of it using Perl and I discovered that perl
> -wlpe 's/../../m;' does not work as I thought it would. The loop implied
> by -lp seems to sabotage the potential of the /m flag.
You can change the record separator on the command-line so that /m
becomes useful again.
Process entire message:
perl -0777 -wpe 's/../../m' < message
Process a paragraph at a time (the header is the first paragraph):
perl -00 -wpe 's/../../m' < message
--
Rick Delaney
rick-h4KjNK7Mzas at public.gmane.org
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list