Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Search and Replace Regex

Justice VellacottJustice Vellacott195 downloads

A powerful regex-based search and replace tool for the app with search highlighting and navigation.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

A powerful search and replace plugin for Obsidian with full regular expression support.

Features

  • Search: Search your notes with regular expressions, plain text, or whole word matching
  • Replace: Replace single or all occurrences with support for regex capture groups
  • Search Options:
    • Case sensitive matching
    • Whole word matching
    • Regular expression mode (or plain text mode)
  • Navigation: Jump between matches with keyboard shortcuts or buttons
  • Search History: Access your recent searches and replacements
  • Match Counter: See which match you're on (e.g., "3 / 12")
  • Persistent Settings: Your default search preferences are saved

Installation

  1. Download the plugin files (main.js, manifest.json, styles.css)
  2. Place them in your vault: .obsidian/plugins/obsidian-search-replace-regex/
  3. Reload Obsidian
  4. Enable the plugin in Settings → Community plugins

Usage

Quick Start

Press Ctrl/Cmd + F (or use the command palette) to open the Search panel:

  • Type your search query (regex or plain text)
  • Use the toggle buttons to customize your search:
    • Case sensitive: Match letter casing
    • Whole word: Match only complete words
    • Use regex: Enable regular expression mode
  • Navigate matches with ↑ and ↓ buttons or press F3 for next

Replace

Press Ctrl/Cmd + H to open Search & Replace:

  • Enter your search query and replacement text
  • Click Replace & Search to replace one occurrence and move to the next
  • Click Replace All to replace all matches at once
  • Regex capture groups (like $1, $2) work in replacements

Keyboard Shortcuts

Action Shortcut
Search Ctrl/Cmd + F
Replace Ctrl/Cmd + H
Next match F3 or Enter
Previous match Shift + F3
Replace single Ctrl/Cmd + Enter
Replace all Ctrl/Cmd + Shift + H
History Ctrl/Cmd + ↓
Exit search Esc

Search History

Access previous searches with:

  • Arrow keys in the search field to cycle through history
  • History button or Ctrl/Cmd + ↓ to browse all past searches
  • Click the trash icon to delete individual history entries

Settings

Configure default search options in Settings → Search and Replace with Regex:

  • Set default case sensitivity
  • Enable whole word matching by default
  • Enable regex mode by default
  • Adjust maximum history items (5-50)

Examples

Search email addresses

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b

Search and replace dates

Search: (\d{4})-(\d{2})-(\d{2})
Replace: $3/$2/$1

Remove duplicate words

Search: \b(\w+)\s+\1\b
Replace: $1

Development

Setup

npm i

Build

npm run build

Watch mode

npm run dev

Lint

npm run lint

Format

npm format

License

0-BSD License

99%
HealthExcellent
ReviewPassed
About
Search notes using plain text or full regular expressions and toggle case-sensitive or whole-word matching. Replace single matches or all occurrences with regex capture groups, navigate between matches, view match counts, access recent search/replace history, and save default preferences.
SearchEditingNavigation
Details
Current version
0.0.4
Last updated
Yesterday
Created
4 months ago
Updates
4 releases
Downloads
195
Compatible with
Obsidian 1.11.4+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
GitHub Sponsors
Author
Justice VellacottJustice Vellacottthejusticeman
thejusticeman.github.io/
GitHubthejusticeman
  1. Community
  2. Plugins
  3. Search
  4. Search and Replace Regex

Related plugins

Creases

Tools for effectively folding Markdown sections.

Quiet Outline

Make outline quiet and more powerful, including no-auto-expand, rendering heading as Markdown, and search support.

Remember cursor position

Remember cursor and scroll position for each note.

Hover Editor

Transform the Page Preview hover popover into a fully working editor instance.

Home tab

A browser-like search tab for your local files.

Dragger

Drag and drop any block (paragraphs, headings, lists, etc.) to rearrange content like Notion.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

Recent Files

Display a list of recently opened files.