Help:VisualEditor/User guide/Find and replace

From Linux Web Expert

File:PD-icon.svg Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info. File:PD-icon.svg

VisualEditor includes a powerful Find and Replace tool. After loading a page in VisualEditor, you can access it from Menu icon File:OOjs UI icon menu.svg, then choosing File:OOjs UI icon articleSearch-ltr.svg Find and replace. You can also press Ctrl+G or ⌘ Cmd+G.

Regular expressions

Switch on File:OOjs UI icon searchRegularExpression.svg button, to enable regular expressions (regex).

In the Find field, some special characters are interpreted as PCRE metacharacters. See documentation.

If you capture subpattern using parentheses, you may reuse captured string in Replace field with ordered $1, $2 … $n variables.

Limitations

You cannot look for newline character.

You cannot replace a phrase based on a lookahead or lookbehind regex.