Skip to main content Skip to navigation

Find and replace content on web pages

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

  1. Go to Edit > Edit centre content or Edit right content.
  2. Select the Find and replace button:

    visual editor toolbar find icon

  3. In the Find and replace window, enter a word or phrase in the Find box.
  4. 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.
  5. 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’.
  6. 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’.
  7. 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
  8. When you have finished, select the X button to close the Find and replace window.

Find and replace in a website or section

  1. Go to the topmost page of the section where you want to find and replace.
  2. Go to Edit > More, then select the Current page tab.
  3. In the Manage content section, select Find and replace:

    Find and replace options

  4. 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.
  5. 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:

    List of pages containing the word or phrase in the find query

  6. To see found words highlighted in the current content, select Show n matches.
  7. 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.
  8. To go ahead and remove all matches, select Remove matches. Alternatively, select Edit search to return to the Find and replace options.
  9. Enter the word or phrase you want to find in the Find box.
  10. Enter the word or phrase to replace it with in the Replace with box.
  11. Specify whether the find query is case sensitive or not.
  12. Specify whether the find query should match the whole phrase or any word.
  13. 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
  14. 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.
  15. 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.
  16. 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.
  17. 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:

    Preview find and replace operation

  18. 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.

Support

Email webteam at warwick dot ac dot uk
How to report a problem