Find and replace works two ways: within the current chapter, or across every chapter in the book. Both support regular expressions, case sensitivity, and a diff preview before anything is written. This article covers the full panel, the regex features, and the edge cases that trip up even experienced authors.
Opening the panel
- Find in chapter. ⌘F
- Find and replace in chapter. ⌘⌥F
- Find and replace across book. ⌘⌥F, then click Whole book at the top of the panel
The panel docks to the top of the editor. Escape closes it and returns focus to the text. You can drag it to the bottom by clicking and holding the drag handle in the panel header.
Scope
The scope selector at the top of the panel has three options:
- Current chapter. Default. Fastest. No preview step for replaces.
- Whole book. Searches every chapter in Body. Skips Front and Back matter.
- Everything. Body plus Front and Back matter. Used mainly for metadata-like changes (character name, series title) that might appear on the title page, dedication, or author bio.
The search result count updates live as you type. If you change scope mid-search, results re-run automatically.
For series and multi-book replacements, you need to run find-and-replace per book. Bellwether intentionally doesn't let you edit across books from one panel; the risk of an unintended change is too high.
Next and previous
Once you have results:
- Enter or ↓ on the Find field jumps to the next match.
- Shift+Enter or ↑ jumps to the previous match.
- Esc closes the panel but keeps your cursor at the current match.
The editor scrolls to show the current match centred in view. The match is highlighted in the brand orange; other matches on the same page are in a softer tint.
Replace
Type your replacement in the second field. A replace on Current chapter is instant; press Enter or click Replace all.
A replace on Whole book or Everything shows a diff preview first. The preview lists every match grouped by chapter, with the surrounding sentence for context. Deselect any match you don't want replaced before clicking Replace selected.
The preview is capped at 2,000 matches. If your search returns more, narrow it down (add more context, use whole-word matching, use a stricter regex) and run in batches.
Replacing one at a time
If you want to review each match individually rather than using the bulk preview:
- Click Replace (next to Replace all) to replace the current match and advance to the next.
- The button is disabled when there's no current match.
This is slower but safer for ambiguous finds like renaming a character whose name appears inside other words.
Regular expressions
Turn on the Regex toggle in the panel to use a regular expression.
Syntax is standard JavaScript regex. A few that come up often:
\b: word boundary. Catches "cat" in "cats" only as the whole word when combined:\bcat\b.(\w+): a capture group. Reference it in the replacement as$1, next group as$2, etc.^: start of paragraph (not line, because manuscript text uses soft line wrapping).$: end of paragraph.\s+: one or more spaces, tabs, or newlines..*?: non-greedy "any character" match. Prefer this to.*for most cases.[A-Za-z]: character class.
Useful examples
Replace "John says" with "John said" across the whole book.
- Find:
\bJohn says\b - Replace:
John said
Swap first and last name.
- Find:
(\w+) Ashford - Replace:
Ashford $1
Capitalise every instance of a word at start of sentence.
- Find:
\. ([a-z]) - Replace:
. $1(you'll need a second pass to actually uppercase; Bellwether doesn't have regex-level transforms yet)
Remove double spaces.
- Find:
{2,} - Replace:
(single space)
Convert straight quotes to curly. Bellwether does this automatically on import, but if you pasted something mid-book, this cleans it up:
- Find:
(^|\s)"→ Replace:$1"(for opening quotes) - Find:
"→ Replace:"(for closing quotes)
Invalid regex highlights the field in red and shows the parser error below. Common cause: an unescaped special character like . or ( in a literal search that should have been an exact match.
Case sensitivity and whole words
Two toggles next to the Find field:
- Aa. Match case. "Mary" and "mary" are distinct matches.
- ab|. Match whole words only. Respects word boundaries, so "cat" won't match "scattered."
Both are off by default. The whole-word toggle is equivalent to wrapping your search in \bs but works without regex mode on.
Finding inside specific elements
By default, search looks at all text in scope. To restrict:
- Dialogue only. Toggle In dialogue only in the panel menu. Searches only text inside quoted speech.
- Narration only. Toggle Exclude dialogue. Searches everything except quoted speech.
- Headings. Toggle In headings only. Searches chapter and section titles.
These are useful for voice-consistency passes (e.g., check which characters use which contractions, only in dialogue).
Undo
A replace is a single undo action regardless of how many occurrences were changed. Press ⌘Z immediately after the replace to revert the entire operation.
If you've made other edits since the replace, the replace is still a single atomic step in version history; open File → Version history to restore the pre-replace state of the affected chapters.
Version history captures the state before and after a replace, so if you made thousands of replacements and realised one was wrong the next day, you can restore the chapter to just before the replace and redo the others.
Saved searches
If you run the same search across multiple books or repeatedly on the same book, save it:
- After a search, click the bookmark icon in the panel header.
- Give it a name ("Passive voice check", "Character name Mary").
- Saved searches appear in a dropdown next to the Find field.
Saved searches include your regex state, scope, and options (case sensitivity, whole word, dialogue-only). They're per-user, not per-book.
Performance notes
Find and replace is fast on books under about 300,000 words. Beyond that, whole-book regex with complex patterns can take a few seconds. If you hit the 10-second timeout, your pattern is probably catastrophic backtracking; simplify it.
For very long books, prefer non-greedy matches (.*?) over greedy ones (.*), and anchor your patterns where possible (^, $, \b).
Common edge cases
Replace skipped some chapters. Check the scope selector. "Current chapter" is the default. Even after a whole-book search, switching chapters resets scope to the new current chapter unless you click the pin icon to keep scope.
My regex matches nothing. Bellwether's regex engine is ECMAScript-standard. It supports look-ahead ((?=...)) but not look-behind on all browsers. Use a capture group workaround if you need to match context before your target.
The panel keeps closing. Clicking outside the panel closes it. Pin it open by clicking the pin icon in the top-right of the panel. Pinned panels stay open until you close them with Esc or the X.
I replaced something I shouldn't have. ⌘Z immediately. If you've moved on, open Version history and restore the affected chapter to the state just before the replace.
Special characters in the search field. If you're searching for something with regex special characters ($, ., (, etc.) and you don't want regex behaviour, leave regex mode off. In literal mode, every character is matched as-is.
I want to keep capitalisation when swapping case. Bellwether's find-and-replace doesn't have a "preserve case" mode. Run two replaces: one for the lowercase form and one for the uppercase. A preserve-case mode is on the roadmap.
Find across book ignores my Front matter. Correct. Use Everything scope if you need to hit Front and Back matter too.