Plugin Regex

Use this wiki plugin to use a "regular expression" style search expression from another wiki page to search for and replace text in the body of the plugin (between the REGEX tags).

Parameters

Plugin Manager error: regex plugin not found

To use this plugin:

  1. Place the search pattern (enclosed with forward slashes) and replacement text on a separate wiki page, separated by two colons ( :: ). For example:
    /search pattern/::replacement text
  2. Then enter that page name as the pageName parameter value of the plugin.
  3. The text in the body of the plugin (between the REGEX tags) will be searched and each match of the search pattern will be replaced by the replacement text.


This plugin mimics the preg_replace PHP function. For advanced search patterns, see http://www.php.net/manual/en/reference.pcre.pattern.syntax.php in the online PHP manual or simply search the internet for "regular expression syntax".

Example

This code:

Copy to clipboard
{REGEX(pageName="PluginRegex Example")}I had a horrible day.{REGEX}


Plus this syntax on a separate wiki page called PluginRegex Example:

/horrible/::wonderful

Would produce:

I had a wonderful day.

Aliases

Plugin Regex | PluginRegularExpression | Plugin RegularExpression | Plugin Regular Expression