Perl: Replacing every instance of a Regex found in multiple files…

Simply use the following command;

perl -pi~ -e 's/regexp1/regexp2/' files


  1. regexp1 - Regular expression you are seeking.
  2. regexp2 - It's replacement.
  3. files - The files you wish this replacement to occur.
Explore posts in the same categories: Technical

Comments are closed.