bulk search and replace for multiple lines?

Viltedali

Regular Member
Feb 10, 2008
310
34
Is anyone aware of a free, preferably lightweight application that can do a search and replace for multiple lines for multiple files?

For example, I have a PHP script that has maybe 20 lines of code that I want to replace with just one line of code - "<?php include("footer.php"); ?>", and I have about 100 files that need this change.

I have the program "Programmers Notepad 2" that has a bulk search and replace feature, but it seems to me that you cannot replace more than one line. It gives you the option of using regular expressions, but I know nothing about them and if they would be the solution or not.
 
If you are comfortable with *nix, look into the program "sed"

You just run that through a for loop for all the files should be replaced.
 
Dreamweaver's built-in find-and-replace tool is the best solution that I know of. You can make global changes to hundreds or thousands of files in one shot. DW isn't free of course, but there's a free trial.

There's also this tool, which I haven't used, but it looks like it would get the job done:

Code:
http://www.bestcode.com/html/findreplace.html
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock