Global Find and Replace in Expression Web
The global find and replace feature in Expression Web is a powerful tool. If used incorrectly it can also prove disastrous. Global find and replace is NOT a reversible process so before you begin, make sure you have a good backup. There is no undo button.
To search across an entire Web site:
Step 1: Open your website in Expression Web.
Step 2: In the folder list, highlight the files you'd like to search through if you want to search just a few files or a selection of files. If you want to search the entire web, it is not necessary to mark any files.
Step 3: Go to Edit > Replace in the menu or click Ctrl-H.
Step 4: Type the words to find in the find box and the words to replace in the replace box. Make sure you tick Display Results in Find 1
Click thumbnail for larger image.
Search Option:
If you want to search some of the pages in your website, make sure "Selected
page(s)" is is ticked. If you want to search only the open pages, make sure "Open
page(s)" is ticked. If you want to search your entire web, make sure "All
pages" is ticked.
Under Advanced, make the selections you want.
Match case matches the exact upper case or lower case of the text you type in. "DIV" will not match "dic". Find whole word only will match only the word "div" and not "divorce." Ignore whitespace differences will match phrases where there's a tab or a carriage return between the words, even if your search phrase had just a space. Regular expressions lets you search with wildcard characters. When you search multiple files you can Find in source code. Expression Web will then look for HTML tags as well as text. Finding and replacing code is the option I use most often.
Step 5: Click "Replace All". Expression Web will alert you that you won't be able to undo this operation. Click "Yes."
Step 6: Expression Web will then show you all the pages where your search string was found. The results will be displayed in the Find pane below your site window.
Click thumbnail for larger image.
You can double click on the results to see what was changed, and make edits. You can also copy and past the list to a Notepad document for later use. NOTE: You will need to place your cursor on the Find Bar in order to use Ctrl + A (Select All) > Ctrl + C (Copy All) > Ctrl + V (Paste).
Example of Notepad Report.
You could also copy the report and paste it into a new page in Expression Web and save it for later use.
Advanced - Expression Web Queries
- Expression Web Queries by Minal Agarwal
- Expression Web Querys - Regular Expression Querys by Tina Clarke
- Regular Expression Queries for Expression Web by Tina Clarke
Updated January 2013