Find & replace
Search the text you are writing and replace what you find, with match case, whole words, regular expressions and your recent searches.
Plenty of apps have no search of their own, or one that only finds. Find & replace works in any text field: it searches what you have written, steps through the matches, and replaces one or all of them.
Opening it
Section titled “Opening it”Tap Find & replace on the toolbar, or in the toolbox if it isn’t pinned (see the toolbar). Tap it again to close it. If you have a few words selected on one line, they become the search, the way Ctrl+F works on a computer. Otherwise it opens empty.
The same panel opens from the selection actions bar’s Replace chip, already holding what you selected.
Password fields can’t be searched; the tool says so and opens nothing.
Searching
Section titled “Searching”The panel has two fields, Find and Replace with. Tap one and type into it; the keys go to the panel, not to the app. The count beside the arrows says which match you are on and how many there are (3 of 12). ‹ and › step through them and wrap round at the ends. Enter in the Find field goes to the next match. The × at the end of a field empties it in one tap.
The current match is selected in the field itself, and also shown in its line at the bottom of the panel with the match marked, so you can see it even when the keyboard covers that part of the text.
The field is read again on every step. Some editors, code editors and notes apps in a web page among them, only draw the part of a long text that is on screen, so the text changes under the panel as it jumps from match to match. After selecting a match the keyboard also reads back what ended up selected. If it isn’t the match, which happens in editors that count their text differently from the way they hand it over, the keyboard looks for the match close by and selects it there.
Four toggles change how the search reads and what a replacement writes:
- Aa matches case.
- [ab] matches whole words only, in any script.
- .* reads the Find field as a regular expression.
$1in the replacement stands for the first group. A pattern that isn’t valid says so, and one that takes too long on the text is stopped rather than left to hang. In the replacement,\nis a line break and\ta tab. - AB preserves case: each replacement takes the case of the text it replaces, so replacing
catwithdogturnsCatintoDogandCATintoDOG. Mixed case such asiPhoneis replaced as you typed it.
Replacing
Section titled “Replacing”Replace swaps the current match and moves on to the next one. Enter in the Replace with field does the same. All replaces every match at once, and Undo takes it back in one go too. A field that doesn’t report where its text is (a few web views) still lets you find, but not replace in place.
Recent searches
Section titled “Recent searches”While the Find field is empty, the bottom of the panel offers your last ten searches. Tap one to search for it again, or Clear to forget them. A search is remembered once you use it, by stepping to a match or replacing, not while you type it.
Nothing is remembered in incognito, in a field that asks not to be learned from, or in a password field. To stop remembering searches altogether, or to clear them from Settings:
WM Keyboard Tools Find & replace Remember searches