Skip to main content
SubtitleMatrix

Find and Replace in Subtitles

Text and stylingFind and replace
Or paste subtitle text

Options

Matched literally, character for character. No wildcards and no regular expressions, so a full stop matches a full stop and an asterisk matches an asterisk.

Written in exactly as typed. Leave it empty to delete every match instead of replacing it.

Off by default, so Alex and alex count as the same word. Switch it on and they do not.

Off by default, so a match can land inside a longer word. Switch it on and searching for the leaves theme alone. Judged by whether the neighbouring characters are letters or digits, so it also holds on Chinese, Japanese and Korean text.

Which frame rate the timings are counted in. On the format pages this is what MicroDVD needs, because it stores timing as frame numbers. On the frame rate pages it is the rate the file was timed against — the version the subtitles were made for — and the page's second box takes the rate of the video you are going to use them with. 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60 are the common ones. Getting it wrong shifts the whole timeline, and on the frame rate pages it shifts it by a ratio rather than by a fixed amount.

Fill in Find to run.

This page replaces a piece of text everywhere it appears in a subtitle file. The search is literal: every character you type is matched as typed, so nothing in the box is treated as a pattern and the replacement goes in exactly as written. Whatever match count the page reports is exactly how many places changed.

Two switches decide what counts as a match. Case sensitivity is off to begin with, so Alex and alex are the same word; switch it on and they are not. Whole word is off as well, and switching it on stops the from matching inside theme. That check asks whether the characters either side of a match are letters or digits, which is why it also behaves on Chinese, Japanese and Korean text rather than only on scripts that put spaces between words.

Inline styling survives a replacement whenever there is an honest place for it to sit: a tag is carried along when the edit moves it, and stretched when the edit happens inside it. When a replacement straddles the edge of a styled run the markup is dropped and counted in the loss report, because the alternative is an italic span wrapped around the wrong letters — a file that looks correct and reads wrong on screen. Timings are never touched. Each file is read and written in its own format, nothing is uploaded, and a whole season can go through the queue at once.

Examples

A spelling variant throughout a file

Input

1
00:00:01,000 --> 00:00:02,000
The colour of the sky.

2
00:00:03,000 --> 00:00:04,000
colourless and calm.

Output

1
00:00:01,000 --> 00:00:02,000
The color of the sky.

2
00:00:03,000 --> 00:00:04,000
colorless and calm.

colourless is rewritten too. A literal search has no idea what a word is, so whole word — not the search term — is what decides that.

Whole word, so theme is left alone

Input

1
00:00:01,000 --> 00:00:02,000
the theme of the day

Output

1
00:00:01,000 --> 00:00:02,000
a theme of a day

Both stand-alone the are replaced and the one inside theme is not. A plain substring search would produce a me of a day.

A replacement that crosses an italic run

Input

1
00:00:01,000 --> 00:00:02,000
the <i>cat</i> sat

Output

1
00:00:01,000 --> 00:00:02,000
the kat sat

The edit straddles the italic range, so the markup has no correct place left and is dropped. The loss report counts it rather than leaving italics around the wrong letters.

Frequently asked questions

Is the search a literal string or a regular expression?

Literal. Every character in the box is matched as typed, so a full stop matches a full stop and an asterisk matches an asterisk. Pattern matching is a separate tool, because a pattern that over-matches can rewrite thousands of cues in one pass.

Does whole word matching work on languages written without spaces?

Yes. Instead of looking for spaces, the check asks whether the characters immediately before and after a match are letters or digits. That makes it behave on Chinese, Japanese and Korean subtitles, where a space-based rule would treat the whole line as a single word.

What happens to italic and bold tags when the text changes?

A tag is carried along when the edit happens outside it, and stretched when the edit happens inside it. When a replacement crosses a tag's edge there is no correct place left for the markup, so it is dropped and the loss report says how many were dropped.

Can I delete text instead of replacing it?

Yes — leave the replacement box empty and every match is removed. An empty search box is a different thing entirely: with nothing to look for there is nothing to change, and the page says so instead of rewriting the file.

Do any timings change on this page?

None. Only the text inside cues is rewritten; every start and end time is carried across exactly as it was. If a file needs its timeline moved, that is what the timing tools are for.

Does replacing text keep the file in the same format?

Yes. Each file is read as whatever format it is, the substitution is applied, and it is written back in that same format — an ASS file stays ASS with its styles and positioning, an LRC file stays LRC, a plain transcript stays a plain transcript.

Related tools