saltyfireball66 downloadsEnhanced search and replace with regex support, live diff preview, capture groups, and a floating editor bar.
An enhanced search and replace plugin for Obsidian. Provides a floating search bar docked to the top of the editor with live highlighting, real-time diff preview, regex support with capture groups, and more.
Works on both desktop and mobile.
$1, $2, $<name>)$1, $2, $<name> are available.* Regex modeAa Case sensitivityW Whole word matchingTo replace Obsidian's built-in Cmd/Ctrl+F with this plugin:
Cmd/Ctrl+F)When regex mode is enabled, you can use standard JavaScript replacement patterns in the replace field:
| Pattern | Meaning |
|---|---|
$1, $2, ... |
Capture group 1, 2, etc. |
$<name> |
Named capture group ((?<name>...)) |
$& |
The entire matched substring |
$` |
Text before the match |
$' |
Text after the match |
$$ |
A literal $ |
This plugin has been submitted for review to the Obsidian community plugin directory. Once approved, you will be able to install it directly from Settings > Community plugins > Browse by searching for "Better Search and Replace".
You can install this plugin right now using the BRAT plugin:
Install BRAT from Settings > Community plugins > Browse (search for "BRAT" by TfTHacker)
Open the BRAT settings
Under the Beta plugins section, click Add beta plugin

In the overlay, enter this plugin's repository: https://github.com/saltyfireball/obsidian-better-search-and-replace (or just saltyfireball/obsidian-better-search-and-replace)

Leave the version set to latest

Click Add plugin
main.js, manifest.json, and styles.css into your vault's .obsidian/plugins/sfb-better-search-and-replace/ directoryDefault colors use the Monokai Pro palette: