KB User's Guide - Documents Tab - Find & Replace Text

This document explains how to find and replace text items and to replace words or phrases in multiple KB documents.

    Using Find & Replace

    1. Click on the Documents tab. Click the Find & Replace link on the lower part of the left navigation bar.
    2. You must have "Publish" rights to use this function; if you do not, the Find & Replace link will be disabled (grayed out).
    3. Enter the word or phrase you wish to find and replace. The search is case sensitive and also applies to strings (phrases) rather than the individual words.
    4. Enter the new word or phrase in the Replace with field. This is also case sensitive.

    5. Enter the ID number/s of the documents in which you want to replace words. If you wish you search multiple documents, enter the document ID numbers in a comma separated list.
    6. Check all of the fields in which you would like to find and/or replace words; Title, Keywords, Summary, Body, InternalNote, Feedbkto and/ or JavaScript/CSS.
    7. Click the Replace All button to replace all text in the specified documents.

    Best Practices

    The Find & Replace is a very powerful and convenient tool. However, it is wise to proceed with caution to avoid unintended changes.

    Case Sensitivity

    Both the Find and Replace with fields are case-sensitive.

    • For example, let's say your document contains "test a string" and "test string". If you enter "test string" in the Find field, only the second instance ("test string") will be replaced.

    Use Leading and Trailing Spaces

    Both the Find and Replace with fields honor spaces placed before and after a word (also known as leading and trailing spaces). It would be prudent to add a leading and trailing space to the words in both fields to prevent unintended replacements. For example, let's say your document contains the word "string" and you want to replace with "sequence".

    The image below shows the terms string and sequence without leading or trailing spaces. The Find & Replace function is looking for *exactly* those two values.

    FampR_withOUTtrailing

    To be more specific:

  • Leading and trailing spaces prevent the unintentional replacement of words like hamstring, stringently, astringent into hamsequence, sequenceently, asequenceent.
  • Leading and trailing spaces prevent other unintentional replacements of words in an image names. An image named string_data_types.jpg, would unintentionally be changed to sequence_data_types.jpg. The unintentional image name change would point to an incorrect image name and yield a broken link. (The image below is deliberately showing a broken link.)


  • The image below shows the terms string and sequence with a leading space before and a trailing space after each term. The Find & Replace function is looking for *exactly* this value.

    FampR_WITH_trailing

  • Leading and trailing spaces will direct the Find&Replace to ignore words like hamstring, stringently, astringent.
  • Leading and trailing spaces will also prevent other unintentional replacements of words in image names. The word "string" in the image named string_data_types.jpg, would be ignored, leaving the image intact.


  • Run the Find function Independently from the Replace

    To minimize the chance of making unplanned changes in all of your documents, you can use the Find function to filter documents down to a very specific subset. Then use the Replace function just on that subset of documents.

    Let's say I wanted to replace the word "matrix" with the word "tree" when we talk about a Topics tree. While it is tempting to do a broad search in all fields of all my documents:

    broadsearch

    I would risk making an unintentional replacement in a document(s) that has nothing to do with Topics. Instead, it is recommended that you isolate a subset of relevant documents and then use the Find & Replace on very specific fields. In the image below, I looked up all the documents with "Topics Tab" in the title. The search yielded five documents.

    Topics_Tab_inTitle

    I now have a very specific subset in which to use the Find & Replace. From here, I will enter the word " matrix " with leading and trailing spaces in the Find field and the word " tree " with leading and trailing spaces in the Replace with field. Next, I will uncheck the Title check box and click on the Body checkbox. I can also add or remove document IDs. Finally, I can click on the Replace All button with confidence.





    Keywords:kb knowledge base knowledgebase users guide drafts tab find replace text gray grey publish   Doc ID:5247
    Owner:Teresa A.Group:KB User's Guide
    Created:2007-01-04 18:00 CSTUpdated:2016-08-29 15:33 CST
    Sites:KB Demo, KB Demo - Child Demo, KB User's Guide
    Feedback:  0   0