User:Faltout/SandBox/Perl regexp encode

Usage
This template replaces special characters used in Perl regular expressions with their encoding. See https://perldoc.perl.org/perlre.html#Regular-Expressions

Characters replaced:
 * ]
 * }
 * }
 * }
 * }
 * }

Characters not replaced:

Note that replacing all the characters one by one is expensive. Use only when necessary. (This could be less expensive with https://www.mediawiki.org/wiki/Extension:ReplaceSet )