Find and Replace text across multiple documents - gHacks Tech News

Find and Replace text across multiple documents

A colleague of mine build a static html website a few years ago. He slowly but steadily created hundreds of html pages which was great for him because he could simply use one already finished file as a template for a new one. It did however pose a problem as well. Updating information across all files was very time consuming. Think of extending the copyright notice each year, adding advertisement to the websites or changing the navigation.

What he needs obvisouly is a program that can find and replace text across multiple documents. Ideally it would be a software that would be easy to use and would require just a few clicks to achieve the desired results. One of the applications that can deliver a speedy way of replacing text across multiple documents is Text Crawler.

Ideally you only need to fill out the old and new text, the location of the documents and the type of documents that you want to change. Text Crawler scans all documents of that type for the phrase that you have entered and displays all occurrences in a list that contains the file name and location as well as the line in the document with the match.

find replace text

The text is only replaced in files checked by the user. Some of the supported file types are txt, log, php, htm, css and ini. What I like is the option to create backup files before replacing the text in the documents and support for Regular Expressions. A great feature is the Regular Expression Tester that allows you to load a text file and test if the regular expression is replacing the text correctly.

The process itself is very fast, takes just a short time to replace the text in the selected documents.

Update: Note that the program runs on all recent versions of Windows. It does require the Microsoft .Net Framework 2.0 though.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Bruno 'ReX' Barbieri said on March 22, 2008 at 2:26 pm
      Reply

      I use a paid program for that “Actual Search & Replace”, it’s good btw. http://www.divlocsoft.com/

    2. Declan said on March 22, 2008 at 5:33 pm
      Reply

      Notepad++, which I use for all my coding, has that functionality over all the open documents in it. I have used it up to about twenty, and found it sufficient.

    3. Jason said on March 23, 2008 at 7:16 am
      Reply

      Use a dynamic language, dork! Get a book on PHP and MySQL and replace that old crap. (Directed at your colleague)

      Oh yeah, Dreamweaver works good for find and replace too.

    4. Roman ShaRP said on March 24, 2008 at 12:42 am
      Reply

      I recommend your friend to try BK ReplacEm. I used it for 7 years or so.

    5. Muhammad Arif said on May 15, 2008 at 9:40 am
      Reply

      I have a request that i want a any softwere for change or edit text in scane documents.
      If any one know about this softwere plz send me the website. I wil be very thanx full

    Leave a Reply