Template:Regexp encode

Usage
This template replaces special characters used in MySQL regular expressions with their encoding. See https://dev.mysql.com/doc/refman/5.5/en/regexp.html

Note: If you are trying to match a wiki page with a regular expression, remember that spaces are underscores ( _ ) in the wiki database and thus need to be replaced in the expression. For example,  should become.

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 )