Global Find and Replace

New to v2.0.2.0, updated v2.0.5.125

Fact Sheet Fusion Global Find and Replace Dialog

The Global Find and Replace dialog allows you to search and replace text within the currently opened projects topic text, derived media captions, the databases media library captions and glossary terms.

Note: The search for matching text is performed within the HTML code, not the rendered HTML view. This means you can find and replace not only words, but also HTML tagging (formatting). This is important to understand particularly when using the 'Match whole word only' option, as HTML tagging adjacent to search criteria may mean it's not found. See the 'Match whole word only' option below for more information on this.

Search Options

Match whole words only

This options will cause the search function only to return matches where the search criteria is clear of other characters. That is the search criteria doesn't form part of another word.
For example, if we searched on the following word 'wiki' with the 'Match whole word only' option selected. The following would apply:

The 'Match whole word only' option can be used in conjunction with the other search options.

Match case

This option allows you perform case-sensitive searches.

For example using 'Wiki' as our search criteria:

'Match case' can be used in conjunction with other search options.

RegEx (Regular Expressions)

A regular expression is a special search string for describing a search pattern. You may already be familiar with wildcard notation such as '*.doc' or '*.*' etc when using your file manager. A regular expression is a much more sophisticated way of defining powerful search patterns. For example, if you wanted to remove all table tags from your HTML while leaving the table content intact you could use a regular expression like:

</?table[^>]*>|</?tr[^>]*>|</?td[^>]*>|</?thead[^>]*>|</?tbody[^>]*>

Don't worry if you don't understand the above example, it was to illustrate the power of regular expressions. Fact Sheet Fusion uses the .NET Framework library for regular expressions, each implementation of regular expressions is slightly different between programming languages, so when developing your own regular expressions or using others you might find on the Internet check that it will work for .NET.

This help is not a regular expression guide. For more information on regular expression patterns supported by Fact Sheet Fusion see Microsoft's Regular Expression Language - Quick reference.

Below are some regular expressions you may find useful when dealing with HTML based content in Fact Sheet Fusion, especially if you have copied and pasted the content from another source or imported it from MS Word.

If you have font tags within your content overriding your template output you can easily find all font tags by:

<font[^>]*>

If you have hard-wired styles within tags overriding your template output you can use:

style="[^"]+"

If you want to remove all span tags from your content use:

</?span[^>]*>

If you want to remove all embedded image tags from your content use:

<img.*?>

Use the regular expression option to find content, via the global search and replace dialog, and use the replace option textbox to replace the matching content with whatever replacement text you prefer. Or replace matches with nothing (empty), which will remove the matched content from the topic or caption.

Search Filters

Topics

This option will include all entity topic text in the search.

Derived Media Captions

This option will include all media that has been attached to entities or entity topics that have derived captions

Click here for more information on inherited vs derived media captions

Library Media Captions

This option will include all library media captions, regardless if the media item has been attached within the project.

Important Note: Library media can be linked to objects (e.g. Entities & Topics) in one or more projects within the selected Fusion database. If you update a Library media caption this change will affect all projects where this item was attached. Using this option (by itself) will not include any derived media captions.

Click here for more information on inherited vs derived media captions

Glossary Terms

This option will include all Glossary Terms in the search.

Find Text

The find text (text to be searched for) can include any combination of characters, including HTML tags, spaces, alphanumerics.

Only text within the selected search filters that matches this will be returned in the search results panel.

Replace Text

This is text, which can include HTML tags, spaces, alphanumerics or nothing, that you wish to replace the found text.

Note: If the replace text criteria is left blank, and a replace function is used, the found text will be deleted in the matching results.

Results color key

Fact Sheet Fusion Global Find and Replace result color
        key

This color key indicates what type of record the search results match. You can set your preferred colors by clicking on each of the corresponding color swatches. Or by selecting the colors via the Fact Sheet Fusion preferences dialog

Search Results

Fact Sheet Fusion Global Find and Replace Search Results
        panel

The search results panel will list all records that match the search criteria after the 'Find All' button has been selected. Each matching record will be color coded and listed in this panel. You can select one or more records in which to apply the 'Replace' function.

When a record is selected within the Search Results panel its content is displayed within the display panel below. This will for example allow you to check the matching criteria prior to making a replacement.

Note: The Replace All function will replace all match text found in the search results records regardless of which records are selected.

TipTip: You can navigate the Search Results (move up or down results) by using the keyboard shortcuts Ctrl + Up arrow and Ctrl + Down arrow.

Record Display Panel

Fact Sheet Fusion Global Find and Replace Record Display
        panel (Rendered View)

Record Display panel (Rendered View)

When a search result record is click on its content is displayed in this panel. You can view the rendered HTML or the underlying HTML code of the record (via the code tab). This is useful for checking the search criteria matches what you intended.

The contents of the display panel can now be edited directly. You must use the 'Save HTML' button (Ctrl + S) to save any changes. You will be notified when the record has been saved successfully via a message in the bottom left status bar of the find and replace dialog.

Note: No save warning will be given if changes have been made within the Record Display Panel, if another search result record is selected. You must remember to save before moving on to the next record.

Fact Sheet Fusion Global Find and Replace Record Display
        panel (Code View)

Record Display panel (Code View)

Find All

The Find All button will initiate the search using the defined search criteria. Any record that are found will be listed in the Search Results panel.

Replace

This function will replace all matching criteria with the replacement text to the selected records in the Search Results panel.

Note: You will be asked to confirm you wish to proceed with the replacement operation, unless you have selected to turn this warning off in the Fact Sheet Fusion preferences dialog.

There is no undo for this operation.

Replace All

This function will replace all matching criteria with the replacement text to all records in the Search Results panel, regardless of the records selected.

Note: You will be asked to confirm you wish to proceed with the replacement operation, unless you have selected to turn this warning off in the Fact Sheet Fusion preferences dialog.

There is no undo for this operation.

TipTip: If you need to perform and find and replace operation on a common element found in HTML tags, for example the ampersand (&) then you may have to consider two find and replace operations:

  1. If the ampersand has been entered via the editor it will be represented in its HTML code form i.e. '&amp;'. You would search and replace on this basis. E.g. Find: &amp;
  2. If it was pasted from another source (or edited directly in the Html code view) as just a regular ampersand ('&'), you would search with a space on either or both sides to avoid finding the ampersands used as a part of other valid tags. E.g. '& ' or ' & ' won't find tags like '&nbsp;' or '&amp;'