Extension:ReplaceSet

ReplaceSet allows for patterns of text, either plain or RegExp based to be replaced. The idea is to allow many patterns to be replaced simply without overloading the Parser with dozens of ParserFunctions and allow for simple replace based syntaxes to be built such as linking certain words in a Card lore.

ReplaceSet is coded to make full use of pcre's performance. All the replacement patterns are passed together at once to pcre instead of looping over each one and doing replacements separate, this avoids shuffling between pcre and php.

Beta
The extension was complete but only missing one minor feature. It was planned to allow use of /=/ and \= in the way that = inside of regex will not end the pattern and a backslash escape \= in strings will allow a = to be used inside of the pattern. (Also need to make sure that \\ will work for that case)

Usage
Regex patterns are wrapped in !pattern! #pattern# (pattern) [pattern] or {pattern}, and may be followed with any of the flags "imsxADU" (see php's documentation on pcre modifiers for what they individually do). Patterns that do not use any of those will be considered plaintext replacements such as "|A=B|" (replace all occurrences of "A" with "B").

Example
Would produce.

Installation

 * 1) Download a snapshot and extract it to your extensions directory.  Choose the version that matches your version of MediaWiki.
 * 2) Add   to the bottom of LocalSettings.php.
 * 3) Installation can now be verified through Special:Version of your wiki.