Perl: Replacing every instance of a Regex found in multiple files…
Wednesday, May 23rd, 2007Simply use the following command;
perl -pi~ -e ’s/regexp1/regexp2/’ files
Where;
regexp1 – Regular expression you are seeking.
regexp2 – It’s replacement.
files – The files you wish this replacement to occur.