Search And Replace Utility to Search Specific Text in File: GrepWin

0 Comments
Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]




GrepWin is a free and advanced search and replace utility that can search for specific text in a file. It can search and replace simple text or you can even use a regular expression. GrepWin allows you to take backup before making any changes to the file and can also work with a hidden, system items and binary files too. You can set this software to do a recursive search within sub-folders. You can also text the search expression in a Regular Expression Dialog Box before you actually apply that to the actual file. As GrepWin adds an entry to the Content Menu, you can right-click on file or folder to search it.

Free Search And Replace Utility - GrepWin - Interface

GrepWin is a wonderful tool when you want to carry out search and replace operation on large files. Of course you could use any text editor and use its search tool for this however a normal text editor would not carry out advanced search operation and might not be able to search with a “Regular Expression”. A Regular Expression is a series of letters and special characters used to carry out an advanced search and replace operation. You could also use the regular expressions to even search for something simple as “blank spaces” and replacing them with a hyphen. You can also read this simple Regular Expression tutorial from GrepWin.

How to use GrepWin?

To use GrepWin to simply search for a piece of text in the folder (containing files) or a file, you can simply right-click on the folder or the file and choose the GrepWin option from the Content Menu. You can also launch GrepWin from the Start Menu.

Choose the “Text Search” Radio button and type in the text you want to search for in the “Search for:” text box and if you want to replace the text with something else, click inside the “Replace with:” text box and type in the text you want to replace with. Once you’re done filling in the text, click on the “Search” button to search for the text or “Replace” to replace the text.

Free Search And Replace Utility - GrepWin - Getting Started

You can get GrepWin to include hidden files, system items and binary files while searching. You can also restrict the search to a file that suffice a specific file size and also tell GrepWin to search in sub-folders.

While replacing a text, you might not want to replace the text directly without taking a backup. GrepWin lets you create a backup of the file that is to be appended and saves it to the same folder as a .bak file. Later, if the changes done were not appropriate then you can rename the .bak file by simply taking off the .bak extension.

Free Search And Replace Utility - GrepWin - Search and Replace

Searching with Regular Expressions

As we talked about regular expression while searching or replacing the text, we will try to understand the usage of regular expression with a simple example. While we’re going to attempt to use the regular expression, you can get a list of regular expressions with examples by pressing the F1 key on your keyboard.

To use the regular expression search in GrepWin, you would choose the “RegEx search” radio button from the type of search. You can type in the expression in the “Search for” text box and carry out the search operation.

Here are some simple examples:

Using * (Asterisk): An asterisk in a regular search expression would mean that anything could replace and take place of an asterisk. For example: sp*l would mean that GrepWin would search for anything like “special”, “spiral”, “spool”, “sproul” etc.

Using .(dot): It is similar to the asterisk that we used above however only one character can take its place. For example: p.t would tell GrepWin to search for “pot”, “put”, “pat” etc., and not “plot” or “prot” as only one character can take its place.

Searching for Spaces (\s): A \s will tell GrepWin to search for all spaces in the file.

Searching for Digits (\d): \d would tell GrepWin to search for all digits in the file.

Start and End of a Line: You can use the ^ (caret) to tell GrepWin to search for beginning of a file and a $ (dollar) will tell it to search for end of a file.

In the same way, you could combine the regular expression and even test it before you apply it. To test it, click on the “Test Regex” button to bring up the Test Regex box where you can put in a sample text and try out your regular expression. While typing in the Regular Expression, GrepWin would tell you if the expression is correct or something is going wrong.

Free Search And Replace Utility - GrepWin - Test Regex

Conclusion

GrepWin is an excellent tool when you want to carry out search and replace operations on huge number of files where manual editing would not be an option. As it can search and replace text using Regular Expressions, you can customize and specifically target at what you want to search and what not to. You can include hidden files and binary files too. This is something that some of the advanced text editors would hesitate to touch. I have tested GrepWin with Windows 7 and it’s perfect. If you’re looking for a free and powerful tool that can carry out search and replace operations on large number of files, then nothing could be better than GrepWin.

Get GrepWin for free

You might also be interested in other free file searching software, click here to know more.

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]
Works With: Windows
Free/Paid: free