There are quite a number of web developers who experienced the previous techniques in performing global find and replace. They had to go into the web server and run scripts like sed and awk on their files. But methods like these can be quite complex especially when the regex is badly formed. Now, those days are over, thanks to the continuous evolving of technology. If you want to perform global find and replace on your website, there are web editors that will help you deal with this task. You can easily carry this one out and you will agree that this is pretty convenient. If you are not using global find and replace software, you ought to try one now.
Let us say that you would like to perform a global search and replace using Adobe Dreamweaver. This is actually one of the easiest methods that you can use. Whether you will be working on a current file or any other files that you have on your website, Dreamweaver will be able to assist you. After you have performed a global find and replace string or file using the software, you will make it to a point to use it anytime you can.
So the first step is to search in a certain file. To do this, open the file that you will use in Dreamweaver. Now, select the option that says “Find and Replace.” This can be found in the Edit menu or you can simply access this using the shortcut Ctrl+F or Cmd+F. Now, enter the words that you want to find in the search box and in the replace box, type the words that you want to replace the word in the first box. Ensure that you have selected “Current Document” before you proceed. Now, click on the Replace button. You can keep on clicking the button until you have replaced all the strings or files that you want to modify.
Now, if you want to perform a global find and replace task on an entire website, open Dreamweaver and select the predefined site. Highlight the files that you see in the folder list that you want to search through. Once again, click on the Edit menu and then “Find and Replace” or you can use the shortcut keys that have been mentioned earlier. Now, type the words that you want to find and replace in the appropriate boxes. Make certain that you have selected the option “Selected Files in Site” so that you can search the files in your website. Otherwise, select “Open Documents” in order to only search within the files that you have opened for editing. Another option is to select “Entire Current Local Site” to search all the pages in that website. Now, you can click on “Replace All.”
Just click on “Yes” when Dreamweaver alerts you that you will not be able to undo the changes that you have made. The results for the search will be displayed just below the window of the site in the Search pane.
If you are interested in Global Find and Replace, check this web-site to learn more about global search and replace.