четвъртък, 18 февруари 2010 г.

Free Text Search and Replace Utilities

This page lists software that will allow you to easily and efficiently search and replace text or blocks of text in a set of files or folders/directories. Most if not all of the programs will allow you to search and replace literal text, while others will also allow you to specify regular expressions to find and replace the text; that is, you can ask the software to replace, say, every instance of "happy" that occurs immediately before "birthday" with "joyous" (or whatever).

Note that this page does not list commercial software like PowerGrep that provides a large set of facilities (including regular expressions), convenience, speed, safety (you can preview the replacement before it happens to make sure it does what you want, you can automatically create backup files if you wish and you can also undo the replacements if you realise you've made an error), the ability to search Word documents, Excel documents, PDF files, compressed archives (like zip files), text and binary files, etc. It's expensive, but in my opinion, if you work with text extensively as programmers and webmasters tend to do, the productivity gain is enough to make it worth the price.

Disclaimer

The information provided on this page comes without any warranty whatsoever. Use it at your own risk. Just because a program, book, document or service is listed here or has a good review does not mean that I endorse or approve of the program or of any of its contents. All the other standard disclaimers also apply.

Free Text Search and Replace Software

GrepWin

GrepWin is a free search and replace Windows Explorer shell extension. It adds a shell context menu to Explorer, allowing you to right click a folder, and specify regular expressions (or literal text) to search and replace in the files in that folder.

InfoRapid Search and Replace

InfoRapid is a Windows utility that allows you to search and replace text within ASCII text files, PDF files (with the help of a third party program), HTML files, RTF files and even Microsoft Office files. It also supports regular expressions for pattern matching. The program cannot be used on a commercially used computer.

K-free: Free Search and Replace

This program allows you to find a particular piece of literal text in a set of files and replace it with another piece of text. A backup copy of the changed file is made, as well as a log for the last replacement made. You can specify that the match must be of an entire word, whether the search be case sensitive, and a few other criteria. (It's not regular expression based though, so the criteria you can specify is somewhat limited.) This is a Windows program.

Search and Replace

This program allows you to search and replace literal text or blocks of text in files matching a particular filter. It also has the ability to replace text begining with a particular string (say, ) and ending with another string (say ) with a different text. It requires you to have installed the Microsoft .NET framework, and thus to be running Windows.

TextRep

TextRep is a simple text search and replace utility that allows you to replace a one-lined literal text with another piece of literal text in files that you select using their GUI. It is a Windows program.

Agent Ransack

Agent Ransack allows you to search for text using regular expressions. This is a Windows program. Note that you cannot replace text with this utility.

AstroGrep

AstroGrep is a Windows GUI version of the Unix grep that allows you to search in files using regular expressions. Note that it does not have replace facilities. Unlike grep however, it includes a GUI facility that allows you to print various aspects of your search results. AstroGrep is open source.

GNU sed

The venerable sed utility is a command line utility to search and replace text from a set of files using regular expressions. It has been ported to a huge variety of operating systems. The link above points to the source code.

Няма коментари:

Публикуване на коментар