Use the find and replace feature to search your website for words or phrases and, optionally, replace them with another word or phrase. This feature is useful when you want to:
- identify pages on your site containing a word or phrase so you can edit the relevant pages manually
- replace a short phrase with another – for example, when a module name changes
- replace instances of an old, broken URL with the correct URL
Find and replace is limited to a maximum of 5,000 pages at a time.
In this article:
Find and replace in one page
- Go to Edit > Edit centre content or Edit right content.
Select the Find and replace button:
- In the Find and replace window, enter a word or phrase in the Find box.
- Optionally, enter the text you want to replace it with in the Replace with box. To only search for words or phrases, leave Replace with empty.
- Choose whether you want the operation to match the case of your Find query. For example, if you select Match case and enter ‘SiteBuilder’ in the Find box, the operation will not match ‘sitebuilder’.
- Choose whether you want to match whole words. For example, if you select Whole words and enter ‘examination’ in the Find box, the operation will not match ‘exam’.
- Select the appropriate button:
- Find – highlight any instances of the word or phrase in the current page
- Replace – replace the first matching instance of the word or phrase
- Replace all – replace all instances of the matching word or phrase
- When you have finished, select the X button to close the Find and replace window.
Find and replace in a website or section
- Go to the topmost page of the section where you want to find and replace.
- Go to Edit > More, then select the Current page tab.
In the Manage content section, select Find and replace:
In the Find box, enter the word or phrase you want to find.Note: by default, any word in Find is matched. It's a regular text search, not Boolean. For example, if you enter modules AND 2007, and leave Match whole phrase unselected, SiteBuilder returns matches for any of the three words modules AND 2007 – not pages containing both modules and 2007.
At this point, if you only want to identify pages containing the word or phrase – for example, to manually investigate rather than replace automatically – select the Find button. Alternatively, if you do want to perform a replace, proceed to step 10.Note: you don't need to specify text in Replace with when you only want to perform a ‘find’ operation. However, if you leave Replace with empty and choose to go ahead with the replace step later, the found text will be removed, i.e. replaced with nothing.
You should now see a list of pages and buttons alongside each page containing the found word or phrase:
- To see found words highlighted in the current content, select Show n matches.
- To preview the page in a new window, select Preview removal. You can see how the content would look should you proceed with the removal.
- To go ahead and remove all matches, select Remove matches. Alternatively, select Edit search to return to the Find and replace options.
- Enter the word or phrase you want to find in the Find box.
- Enter the word or phrase to replace it with in the Replace with box.
- Specify whether the find query is case sensitive or not.
- Specify whether the find query should match the whole phrase or any word.
Choose the scope of the find and replace operation from the Pages to search drop-down list:
- Current page and all sub-pages (default)
- Current page and all sub-pages in the same site
- Current page only
- Specify how the find and replace operation applies to your pages by selecting the relevant radio button:
- Apply changes only to the content of the pages – the centre, right or surrounding content.
- Apply changes to the content and the page properties of the pages – the centre, right or surrounding content, plus the page heading, link caption, title bar caption, description and keywords in page properties.
- By default the find and replace operation applies solely to text in a page. For example, the link caption text is matched, but its target URL is not. To include non-visible text in the find and replace (including alt text), select Include image, link and embedded media descriptions and URLs.
- Optionally, expand the Advanced options and select the relevant checkbox for:
- Use regular expressions – this is for those familiar with regular expressions; use with care.
Match raw HTML – to find and replace in the raw HTML without any of the restrictions mentioned in steps 14-15. When you select Match raw HTML, the option to Include image, link and embedded media descriptions and URLs is disabled.Caution: changing HTML can cause a page to display incorrectly.
When you have finished specifying the options, select the Find button. You should now see a report listing every page searched and the number of matches:
Review the matches. When you have finished previewing how the pages will change, do one of the following:
- perform the replace operation by selecting Replace matches
- go back and edit your find and replace options by selecting Edit search
Caution: be sure that you're happy with the preview before you proceed and replace the matches. It's not possible to undo the replace in a single operation; it requires visiting each page to restore the previous version via the page history.
Email webteam at warwick dot ac dot uk
How to report a problem