nonethefewer: (Default)
[personal profile] nonethefewer
What is the command-line regex in Perl for "replace every line that does NOT have $string in it"?

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable

(no subject)

Date: 2010-07-08 08:16 pm (UTC)
From: [identity profile] novalis.livejournal.com
perl -npe '/$string/||s/from/to/'
Page generated Jan. 24th, 2026 06:25 am
Powered by Dreamwidth Studios