Search and Replace Patterns

If you have Search and Replace patterns that you use regularly, you can cause StrongED to remember these. You must give each pattern (Search or Replace) a unique name and, once set up, you can enter these names, without " ", in the Search box and/or Replace box. Remember to select Advanced.

There are separate patterns (and names) for Search and for Replace. But, to tie Search and Replace together so you can remember them more easily, there is no reason why the same name cannot be used for the Search exprerssion and for the Replace expression. Or a variation on the same name - say Sfoo and Rfoo.

These named expressions can be saved in three places:

  1. ModeFile for current mode, when it is only available in this mode
  2. ModeFile for BaseMode, when it will be available in any mode
  3. Global Patterns file, when it will be available in any mode
StrongED looks for these named expressions in the files in the above order.

Patterns File

StrongED ships without a Patterns file. You'd normally create the file as !StrED_cfg.UserPrefs.Global.Patterns and then populate it with the search and replace expressions as you require.

The Patterns file is essentially a cut down ModeFile which consists of a Search section and a separate Replace section. You use these sections in the same way as you would do in a ModeFile:

   name    search pattern

   name    replace pattern

ModeFiles that already include a Search and/or a Replace section

these include:
BaseMode BaseMode
News News
StrongHTML StrongHTML

Was this page helpful? Please email me and/or rate this page:

If you want a reply make sure any email address will not get spam-binned!
Optional comment

Other relevant pages

Top of page

Page Information Document URI:
Page first published 12 Jan 2018
Last modified:Wed, 06 Mar 2019 19:14:37 GMT
© 2017 - 2024 Richard Torrens.