Text Studio · Windows 10 and 11

Find and replace text

Press Ctrl H, type what to find and what to put instead, and replace one match at a time or all of them at once. Every match is highlighted as you type, and patterns (regular expressions) handle the jobs that plain words cannot.

Updated

How to find and replace text

  1. 1

    Open the find bar

    In Text Studio, press Ctrl F or the Find button. Ctrl H opens the same bar with the replace box ready.

  2. 2

    Type what to find

    Matches light up in the text and the bar counts them. Enter jumps to the next one, Shift Enter to the previous.

  3. 3

    Narrow it down

    Turn on Match case to tell “Mark” from “mark”, Whole words so “cat” skips “category”, or Pattern for a regular expression.

  4. 4

    Replace

    Type the new text in Replace with, then press Replace for the current match or Replace all for every one.

Patterns in five minutes

With Pattern on, the Find box takes a regular expression, written the way JavaScript reads it. A handful of pieces cover most jobs:

TypeIt finds
\dAny digit; \d+ a whole run of them
\sA space, a tab or a line break
.Any character except a line break
[aeiou]Any one of the characters in the brackets
colou?rcolor or colour: ? makes the character before it optional
cat|dogcat or dog
\p{L}A letter from any alphabet
( )Round brackets around part of a pattern make a group, which the replacement can put back
\.A real full stop: a backslash makes a special character ordinary

In Replace with, $1 and $2 put back what the first and second groups found, and $& the whole match. Two details matter. Text Studio searches the text as one block, so ^ and $ mean its very start and end, not the start and end of each line. And a pattern that cannot be read shows “Not a pattern” where the count would be. To build and test a long pattern, the Dev Toolbox has a regex tester.

Replacements worth knowing

Find, with Pattern onReplace withWhat happens
(\d{2})/(\d{2})/(\d{4})$3-$1-$210/08/2026 becomes 2026-10-08
(\p{L}+), (\p{L}+)$2 $1Lovelace, Ada becomes Ada Lovelace
\b(\w+) \1\b$1A doubled word such as “the the” becomes one
\[\d+\](nothing)Reference marks like [12] disappear
https?://\S+(nothing)Every web address is removed

Take the first row apart and the method is clear: each pair of round brackets is a group, so the month is $1, the day $2 and the year $3, and the replacement puts them back in a new order with hyphens between. The second row does the same with two words around a comma.

Replace all always works on the whole text, even when part of it is selected, and Ctrl Z takes it back in one step. Without Pattern, the replacement is used exactly as typed, so $10 stays $10; with Pattern on, write $$ for a dollar sign.

Small things that make it dependable

  • Whole words knows letters from every alphabet, so “café” does not match inside “cafés”, just as “cat” skips “category”.
  • With Match case off, capitals are ignored: “mark” finds Mark and MARK as well.
  • Replace changes the current match, so pressing it again and again works through the matches in order, one at a time, when each needs a look first.
  • The count is a check before you commit: if it says 12 matches, Replace all will change twelve places, and a number that looks too high means the search is too broad.
  • Matches are painted in texts of up to 300,000 characters. Longer texts are still searched, and the count stops at 10,000 even though Replace all replaces every match.
  • Esc closes the find bar and puts you back in the text.

Working on files

Open a file with Open, make the replacements, and Save writes them back; Ctrl Shift S saves a copy under a new name instead. Text Studio opens .txt, .md, .csv, .tsv, .log, .json, .xml, .html, .css, .js, .ts, .ini, .yaml and .srt files, so a renamed product in a CSV, a new server name in a config file or a misspelled name in subtitles is a few keystrokes away. It works on one file at a time, not across a folder.

Subtitles show why the search matters more than the replacement: to fix a misspelled name across a whole .srt, search for the name with Whole words on, check the count, and Replace all. The caption numbers and timestamps cannot match a name, so they stay as they were.

To see exactly what a Replace all changed, press Copy all before it, then open Compare afterwards and paste: every line the replacement touched is marked.

Questions, answered

Can I replace text in several files at once?

No. Text Studio works on one text at a time: open a file, replace, save, and open the next.

Does it support regular expressions?

Yes. Turn on Pattern and Find takes JavaScript regular expressions, with $1, $2 and $& in Replace with.

Why does it say Not a pattern?

Something in the expression cannot be read, often an unclosed bracket or a backslash before a character that needs none, such as \- outside square brackets. Text Studio reads patterns in Unicode mode, which is stricter about those than some editors.

Can I find line breaks and tabs?

Yes, with Pattern on: \n finds line breaks and \t tabs, and you can replace them with spaces or commas. Adding new line breaks is not possible, because Replace with holds a single line.

Does Find search only the selected text?

No, it always covers the whole text. Selecting a word on one line before Ctrl F just fills it into the Find box.

Is my text checked online?

No. Find and replace runs in Text Studio on your PC, so contracts, configuration files and customer lists are searched without leaving it.

Find and replace, and 16 more apps.

Download for Windows

7 days free, then from $3.99 a month for all 17 apps. Windows 10 and 11.