Text searching made easy with Notepad++

Notepad++ is one of the best productivity tools. Here I going to share how to use notepad++ to find and replace text in day-to-day life. In my case I feel lazy I when I have to find and replace some text in a bunch of files until I come to know about the find and replace option in notepad++.

Even it is a productive tool, it is not productive tool until we use it productively.

Find and replace dialog

You can see, the find and replace dialog in notepad++has mush more sophisticated option than the normal notepad search option.


Find and replace dialog come with 4 option
  • Find - you can find the current document or all opened the document in notepad++.
  • Replace - You can replace in the current document or all opened the document in notepad++.
  • Find in Files - You can find files which are not opened in notepad++ using file directory.
  • Mark - This allows use to mark expected text in the current document and also bookmark those lines.

Find & Replace

Find and replace will have similar options (as see in above image) except its functionality, find will find text whereas replace will have the option to replace it

Wrap around
When you have checked this option it will skip the direction option selected in the search dialog. It will search in file from up to down in a loop

Search with wrap around

Search without wrap around

Normal search

It is simply plain text search. If you have any escape sequence like \n \t in your search text, It will treat this as normal text and search for the same in the document.

Extended search  

In extended search mode, we can use the escapes sequence when we search the words contain tab space or new line break. Please see below image for how it works


Search using regular expression

Regular expression based search is most advanced and very useful feature in notepad++. Let’s consider that you have one mail address say abc@xyz.com in the document but you don’t have any idea about username (abc) and email host address (xyz.com). Now you want to change email host address to zyx.com, all you need to do is construct the regular expression to find the word in email address format in the document the replace it with required email host address. Let see how it works in below image


Find and replace in files

This is one of best feature that I have seen in notepad++. It made my work very easier when I have to find text in my working project


It has the similar user interface and search option with the addition to two option shown in the image. This two option is related to files and directory
  • File filters
  • File Directory
File filters
We can mention file(s) to search, it is the prefix and suffix filter. We can mention single file or multiple files separated by the semicolon.  We can use this filter in three way

We can mention prefix of file to search

If use index.* in filter textbox it will search for all file with name of index irrespective of file extension
Example it will search file following file index.css, index.cshtml, index.txt, index.xml, and etc.

We can mention the suffix of file to search
If use *.html in filter textbox it will search for all file with extension of html irrespective of file name
Example it will search file following file index.css, index.html, home.html, account.html, and etc.

We can mention both prefixes and suffix
If use site.css in filter textbox it will search for only file site.css in all directories

File Directory
We can mention the directory of the file to search. If you want to include files in subdirectory and hidden files in search then you need to check this two option shown in image


Below image shows the how searching is made easy with file directory and file filters in notepad++



Text searching made easy with Notepad++ Text searching made easy with Notepad++ Reviewed by Unknown on 18 March, 2016 Rating: 5

No comments:

Powered by Blogger.