Global Find and Replace

Administrators with Level 10 access privileges can conduct a site-wide search and replace using the Global Find and Replace feature. This feature allows for literal text or regular expression matches. The most recent changes can also be reverted as necessary.

Global Find and Replace can affect all files on the staging server. This could affect new page templates if the templates folder is included in the directory selection.

CautionGlobal Find and Replace can be a site-wide operation. Use caution and make a backup if necessary.

Locating the Global Find and Replace Feature

Global Find and Replace is found in Content > Find/Replace as shown below:

Global Find and Replace Tab


This feature makes global changes to a site inside the selected directories. Even though the last Global Find and Replace operation can be reverted, it is recommended to use caution while conducting any global, site-wide operations. See Best Practices for information regarding making a backup.

Before finding and replacing, do a find only and review the results. Also, review the change summary after clicking Find/Replace. If anything is out of the ordinary, revert your replacement operation and refine your search pattern. Remember, only the most recent Global Find and Replace operation can be reverted.

Next Page


Using Global Find and Replace

The basic steps for performing a Global Find and Replace are:

  1. Navigate to Content > Find/Replace.
  2. Select the directories to search. It is possible to drill down to specify directories.
  3. Select a Search Type: Literal Text or Regex.
  4. Enter the text string or regular expression to find/replace.
  5. Enter the text string or regular expression that will replace the information found.
  6. Select Find, Find/Replace, or Reset.
    - NOTE: It is always advised to first conduct a Find before using the Find/Replace

About the Find/Replace Window

The Find/Replace window is shown below:

Global Find Replace Window with Legend


  1. Last/Find Replace link for viewing or reverting changes.
  2. Search Type selection: Literal Text or Regex.
  3. The Find field and the Replace with field.
  4. Comment field. It can be useful to have a comment associated with a global change.
  5. Find, Find/Replace, Reset buttons.
  6. Directory selection area.

Previous PageNext Page


Performing a Simple Find

The simplest application for the Global Find and Replace feature is a literal text search. A simple character string is used to search the site. A search can be limited to the current directory only or specific directories can be selected. Literal text finds and replaces are case sensitive.

The steps for performing a simple literal text search are:

  1. Make a directory selection. Selecting a directory includes its subdirectories. See image below for options.
    • To limit a search to a specific directory or directories, select the checkboxes next to the directories. Clicking a hyperlinked directory allows for drilling down to subdirectories for selection.
    • To just search the files in the current directory, select Files in Current Dir.
    • To select all directories, select the Dir Name checkbox.
  2. For Search Type, select Literal Text.
  3. Enter the text string to find.
    For example:
  4. Select Find.

The Reset button can be used to clear the form.

2 directories selected Global Find and Replace Directories All directories selected
a b c


Previous PageNext Page


Viewing the Results

The Search Results area displays several pieces of information:

  • The number of files searched
  • The number of files found with the search term
  • The file names of files that include matches
  • The number of matches within the file
  • The search term in context

Global Find and Replace Results

If no results are found, the message reads:

Your search did not match any documents.

Up to 10,000 results can be displayed for one search. Up to 100 matches are shown for each file listed with the search term highlighted in yellow. For example, if there are 111 results for the search term on the index.pcf page, only 100 are listed in the return. If there are more matches, at the end of a listing for a page it shows: ... More Matches ...

If not all the files are displayed, at the end of the results it shows: ... More files ...

These display limits apply to the find function only. Performing a replace will affect all matches regardless of the preview display limits.

Previous PageNext Page


Performing a Literal Find and Replace

Extending the same example used for a simple find, Bob's email is to be replaced with “”.

The steps are:

  1. First perform a find only and review the results to determine what would be affected by a replace.
  2. Make a directory selection. (See Performing a Simple Find for further details about directory selection.)
  3. For Search Type, select Literal Text.
  4. Enter the text string to find.
    For example:
  5. Enter the text string to use in the replace.
    For example:
  6. Specify a comment. This attaches a short note about the save in the OU Campus file system for future reference. These comments are useful in tracking file changes long after the replace operation has occurred.
  7. Select Find/Replace
  8. Confirm the replace.
  9. The Last Find/Replace screen is displayed. See the section on reverting below to see this screen. It can be very useful to export the displayed report to save for future reference.
  10. Files must be published to update the files on the production server. Click the Publish button to publish immediately. The files can also be published individually in the Content > Pages.

Upon publishing, the Confirm message is shown. At this point, there's the option to publish all files or only publish checked-in files. Using Publish all files publishes files that are checked out and checks them back in. Publishing a file that is currently checked out publishes the file in its current status in the workflow process, which may be incomplete or currently being edited. In this case, changes may be lost or published prior to the desired time. Using Publish only checked-in files will not publish checked-out files and will leave them checked out.

Global Find and Replace Publish Confirm Message

When choosing to publish only checked-in files, this is reflected in the publish message as shown below:

Global Find and Replace Publish Messages


Previous PageNext Page


Reverting the Last Global Find and Replace

A global replacement can be reverted using the Last Find/Replace screen. Only the last operation can be reverted. The screen is shown immediately after a Global Find and Replace operation and it can be navigated to by clicking the Last Find/Replace link as show below:

Locating the Last Find/Replace link

The Last Find/Replace panel shows the following information about the search and replace, which is also the screen seen after a find and replace is initially completed:

  • Search type
  • Replaced date
  • Username of the person who performed the search
  • The number of files committed
  • The string that was searched for
  • The string that was used as the replacement
  • The comment that was entered in the Comment field

Global Find and Replace Last Find and Replace

Information about the files is also displayed. This includes:

  • The file name in which the search term was found
  • The number of matches within each file
  • The date and time of the last save
  • The version of the file that would be reverted
  • The current version of the file

Once the file is published, the current version is shown, and in the event of reverting, the version that would be reverted to is also shown.

Global Find and Replace Revert Version

The Revert, Publish, and Cancel buttons are also displayed. To revert:

  1. Select Revert to undo the most recent replace operation. The onscreen message provides an explanation of the the actions that were performed.
    Global Find and Replace Revert Message
    The pages would need to be published to push the latest version to the production server.
  2. Select Publish to push all the changed files to the production server.
  3. Select Cancel to display the main screen.

Exporting a Report

The Global Find & Replace feature also includes the functionality to export a report. The Last Find/Replace screen contains a link to export a report of the last global find and replace operation. The report includes the information shown onscreen. It is exported in CSV format. It can be useful to have a copy of the global find and replace action on hand. Always remember to import CSV files into Excel, as opposed to opening them in Excel directly.

Previous PageNext Page


Using Regular Expressions

A find and replace search pattern is not limited to plain text. The OU Campus regex engine uses the Posix standard. Regular expression matches can also be performed. Select Regex for the Search Type. The Regular Expressions page provides information about using regular expressions in OU Campus, common examples and scenarios for usage, configuring a file name regex when setting up sites, and several tables listing the specific regular expression syntax used. The syntax listing contains character classes, predefined and POSIX character classes, boundary matchers, greedy, reluctant, and possessive quantifiers, and so on. A regex find and replace is available for content contributors and administrators that have access to utilize the Source Editor to edit source code. The regex behavior as exemplified within the Source Editor and with a Global Find and Replace is slightly different in that the Source Editor is a line-by-line search and the Global Find and Replace searches the whole page. Global Find and Replace matches white space throughout the document. For more information about regular expressions, see:

Regular Expressions

Example of Regex Find

Example of a Regex Find

Previous PageNext Page


Best Practices

Backing up a Site

Creating backups is recommended. Administrators with Level 10 access can export a copy of the site on the staging server from Setup > Sites >Export button.

Location of the Export button within the site setup panel

Using the Global Find and Replace Comment Field

The Global Find and Replace comment field is used to attach a quick note of changes within the OU Campus file system. When reverting individual pages using the versioning system, a record is kept explaining the changes that were made to that file. This comment is shown in the page publish note, which is useful in tracking recent file publishes.

Previous Page


Was this page helpful?

Additional Comments:

(Include your email address if you would like a reply)

Procede to