Extension:ReplaceSet/ja

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.

使用法
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").

If you need to use an  within the pattern or text you want to replace you can wrap the pattern inside of a nowiki. ie:

例
Would produce.

インストール

 * 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.

Configuration
has two configurable limitations:
 * $egReplaceSetCallLimit
 * A limit to the number of times #replaceset may be used in a page. This is set to 25 by default.


 * $egReplaceSetPregLimit
 * A limit passed to preg limiting the number of replacements within the text to replace that will be made. This is set to 50 by default.

関連項目

 * Extension:RegexParserFunctions/ja
 * Extension:StringFunctions/ja
 * Extension:ParserFunctions/ja
 * Extension:VariablesExtension/ja