This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

search-replace Operator

 29th August 2021 at 5:45pm
purposereturns each item in the list, replacing within each title the string specified by the first parameter with the second parameter
inputa selection of titles
suffixthe search-replace operator uses a rich suffix, see below for details
parameterthe search-replace operator requires 2 parameters, see below for details
outputthe input titles with the search string replaced with the replacement string

Learn more about how to use Filters

Introduced in v5.1.23

The search-replace operator uses an extended syntax that allows for multiple suffixes and parameters to be passed:

[search-replace:<flag list>:<regexp-mode>[<search-term>],[<replacement>]]
  • flag-list: g for global mode to replace all matches, i for case-insensitive mode, Introduced in v5.2.0 m for multiline mode, "gim" for all. (optional)
  • regexp-mode: regexp to treat the first parameter as a regular expression (optional).
  • search-term: string or regular expression that should be replaced
  • replacement: string that should replace the search-term

Tip
Either parameter can be a string, a text reference or a variable

Examples