Topic on Extension talk:Replace Text

Replacements file format / Regex question

1
Amousey (talkcontribs)

Excellent feature, and a great time saver - thank you.

--replacements option More documentation and examples would be helpful on the replacements file.

The replacements file format is described as:

The format of the replacements file is tab separated with three fields.

Any line that does not have a tab is ignored and can be considered a comment.

Fields are:

1. String to search for.
2. String to replace found text with.
3. (optional) The presence of this field indicates that the previous two are considered a regular expression.

Example: This is a comment TARGET REPL regex(p*) Count the Ps; \\1 true

Questions - Can any database including MariaDB use the regex here, including those described as unable to use regex from the interactive dialog option (MS SQL/SQLServer or SQLite)? - If not using a regular expression, do any special characters need to be avoided / escaped eg pipe |, =, {} and " ' quote marks, etc - How to active ReplaceText from the user interface using a pre-configured set of options, including a replacements file, eg for a non-technical user

Future suggestion: - a way to mark up pages not to have text replaced or ignoring pages with the DISAMBIG tag, which would allow it to be used for autocorrect - A bot using a replacements file. Is there example choose & instructions anywhere?

Reply to "Replacements file format / Regex question"