Patrick Stephens43 downloadsFind matches in the current note using a regex or plain-text pattern, with live highlighting, next/previous navigation, and select-all-to-edit.
Find matches in the current note using a regex or plain-text pattern, with live highlighting, next/previous navigation, and select-all-to-edit.
This plugin is desktop only (it isn't available on Obsidian mobile). I built and tested it on macOS. It should work the same on Windows and Linux, but I haven't tried those, so please open an issue if something doesn't work.

Cmd/Ctrl+P to open the command palette, type "Regex Search Bar", and choose Regex Search Bar: Open search bar. The search bar appears at the top of the note with your cursor already in the search box. If you had text selected in the note, it's filled in for you. (To skip the command palette, set up a hotkey.)Enter to jump to the next match, or Shift+Enter to jump to the previous one.Option+Shift+Enter on Mac or Alt+Shift+Enter on Windows/Linux, or click Select all. Every match is selected in the note and your cursor moves back into the note. Start typing and all of them are replaced with what you type. The search bar stays open.× button, or press Esc while your cursor is in the search box.If the search bar is already open, running the command again moves your cursor back into the search box and selects its text.
From left to right, the search bar has:
.*). It switches between regex matching and plain-text matching. When the button is highlighted, regex mode is on, and that's the default. When it isn't, plain-text mode is on: the bar searches for what you typed literally, so characters like . and * are treated as ordinary characters. Hover over the button to see which mode you're in.2/5, or "No matches".↑ and ↓). Jump to the previous or next match.×). Closes the search bar.Searches are not case-sensitive in either mode, so note also matches Note. If you type an invalid regex, the bar falls back to plain-text matching automatically and the match count turns red.
A regex (regular expression) is a pattern that can match more than one exact piece of text. With regex mode on:
colou?r matches both "color" and "colour".cat|dog matches "cat" or "dog".\d+ matches any number, such as "7" or "2026".[A-Z]{3} matches any three capital letters in a row.^# matches level 1 headings (# Title). A level 2 heading (## Title) needs ^## instead, so the pattern has to include every # in the heading. To match a heading of any level, use ^#+ .^ means the start of a line and $ means the end of a line, so done$ matches "done" only at the end of a line.If you don't need patterns, switch to plain-text mode and search for words as you normally would.
No hotkey is bound by default. I recommend using Cmd/Ctrl+F, since that's where you'd normally reach for search:
Cmd/Ctrl+,), then choose Hotkeys.Cmd/Ctrl+F hotkey, click the × to clear it. Obsidian binds Cmd/Ctrl+F to this command by default, so the two would conflict.+ button, press Cmd/Ctrl+F on your keyboard, and confirm.If you'd rather keep the built-in search, use Cmd/Ctrl+Shift+F in step 3 instead, and skip step 2.
Copy main.js, manifest.json, and styles.css into <vault>/.obsidian/plugins/regex-search-bar/, then enable the plugin in Settings → Community plugins.