© Copyright Excosoft. Powered by Skribenta CCMS® and Topic Finder CDP®

Find and navigate

Filters


Add/remove/view favorites


Table of contents

File properties

Searching and replacing content

Background

The procedure in this topic assumes Skribenta is installed and configured for normal operation, and:

You need to find and replace content in your file.

It is possible to find and then replace content within files in Skribenta. Replacement of content will only be done in opened files. When the replacement in the current file is completed, the replacement continues in the next opened file.

It is also possible to replace all instances of a string. This is done only in one file at a time.

About this task

This instruction tells you how to find and replace content in a file.

This is the file content before searching and replacing a string in a file:

This is the file content after searching for the string "StringX" and replacing with "StringY" in a file:

Open the Replace field, set search filters, type a search string and a replace string, then do a find and replace in the file.

1 minute

Procedure

1. Make sure that the step(s) in section "Starting point" (see section "Background" above) are performed.

If there is a particular file that you want to start searching in, click the file to select it.

A search box opens on the top toolbar.

  • for backward search.

  • for case-sensitive search.

  • for whole word search.

  • for search in attributes.

  • for approximate string matching search.

  • (only text can be replaced).

The Replace box opens.

The first search hit is selected in the file content.

  • If you selected to find and replace in attributes, the attributes dialog box opens.

  • Replace to replace the selected string and find the next occurrence.

    If the files are opened in the Nav frame, and the search and replace in the current file is completed, the search and replace continues in the next opened file.

    If the files are opened as separate tabs in the Content frame, only the content on the selected tab is searched and replaced.

    When all occurrences are replaced, a message is displayed.

  • Replace All to replace all occurrences in the file.

    A Confirm dialog box opens.

    The replacement is done.

    A message is displayed telling that the replacement is ready.

    The Replace All function:

    • only replaces strings in one file at a time.

    • replaces strings in the file, regardless if they are visible or not due to, for example, compressed sections.

    Case-sensitive replacement:

    When text is replaced, the letter case in the found text can be maintained in the replacement text, so-called "intelligent replacement". This only happens if the find and replacement text are all lower case. Three situations in the found text are handled:

    • All lower case

    • All upper case

    • First character is upper case

    If, for example, "cat" is going to be replaced by "dog", this happens:

    • "cat" is replaced by "dog"

    • "CAT" is replaced by "DOG"

    • "Cat" is replaced by "Dog" (also "CAt" and "CaT" will be replaced by "Dog")

    All other combinations ("cAt", "caT", "cAT") are replaced by "dog".

    The "intelligent replacement" is not performed for attributes - the letter case in the replacement text is never changed.