in reply to Re: simple (in theory) regexp question
in thread simple (in theory) regexp question
% perl -i -pe 's/^--(.*)\n//g' your_file
hm. that would delete every line that starts with two dashes (the original poster wanted to keep those lines).
Update: removed the 'm' modifier bit, since the code was acting on the file, instead of acting on the 'slurped' file.
hope this helps,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: simple (in theory) regexp question
by Juerd (Abbot) on Apr 14, 2002 at 20:50 UTC | |
by christina_sampson (Novice) on Apr 14, 2002 at 21:26 UTC |