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
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Regex Line Filter

64mm4-kn1f364mm4-kn1f3782 downloads

Filter a note with regex so that only lines that match are displayed.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

image

Version 1.3.5

Purpose:

The plugin allows users to filter the active editor view in Obsidian so that only lines matching a user-supplied regular expression are displayed. Users can edit these visible lines. Toggling the filter off restores the full view of the note with the edits preserved. Toggling it back on re-prompts for a regex (pre-filled with the last used one).

Key Features:

  • Regex Filtering: Filters the current note based on a JavaScript-compatible regex (including emoji support).

  • Hotkey Assignable Custom Filters: Create custom filters and assign individual hotkeys to them. Toggling multiple custom filters will allow for incremental additive/subtractive filter output.

  • Live Editing: Allows editing of the filtered (visible) lines directly. Edits are saved to the actual note.

  • Toggle Command: Provides a command palette action (and assignable hotkey) to toggle the filter on/off.

  • Regex Input Modal: A clean modal prompts for the regex when activating the filter.

  • Persistent History: Remembers the last 5 unique regex strings used across sessions and displays them as pinable/saveable entries in the input modal for quick reuse.

  • Template Date Variables: Use relative dates in your filters. Eg {{date:YYYY-MM-DD}} or {{today}} for the current date, {{yesterday}}, {{last-month}}, {{last-year}}, {{tomorrow}}, {{next-month}} and {{next-year}}.

  • Empty Line Handling: Includes a setting to choose whether empty lines (containing only whitespace) should also be hidden when the filter is active (defaults to true).

  • **Visual Indicator:**Adds a subtle darkening effect (inset box-shadow) to the editor margins when the filter is active, providing clear visual feedback.

  • Child indents: Child indents will be included in an active filter by default. This behaviour can be disabled in plugin settings if desired.

  • Copying filtered text: Selecting across filtered lines then copying will copy only the visible lines to clipboard. This default behaviuor can be disabled in plugin settings.

Known Limitations:
  • Negative lookaheads: Possible issue with negative lookaheads in regex.

How To:

image

Demo showing a number of regex filters used with the plugin assigned to a HotKey.

Thank You:

  • To SkepticMystic for the inspiration for saveable individual filters in your Advanced Cursors plugin.
  • To FelipeRearden, stef-rausch and nanjingman for the feature suggestions!

License: Apache 2.0


Buy Me A Coffee

HealthGood
ReviewCaution
About
Filter the active note to show only lines matching a JavaScript regular expression and edit those lines live with changes saved back to the file. Create and assign custom filters with hotkeys, reuse recent regexes and date-template variables, control empty lines and indents, and toggle the filter with a subtle editor visual indicator while copied text includes only visible lines.
SearchEditingHotkeys
Details
Current version
0.1.3.5
Last updated
8 months ago
Created
Last year
Updates
4 releases
Downloads
782
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
Apache-2.0
Report bugRequest featureReport plugin
Sponsor
Support
Author
64mm4-kn1f364mm4-kn1f3
dear.inheadlights.com
GitHub64mm4-kn1f3
  1. Community
  2. Plugins
  3. Search
  4. Regex Line Filter

Related plugins

Shortcuts extender

Use shortcuts for input special symbols without language switching.

Keyshots

Add classic hotkey/shortcuts commands from popular IDEs like Visual Studio Code or JetBrains Family.

Floating Search

Search text by using Obsidian default search view.

Code Editor Shortcuts

Add keyboard shortcuts (hotkeys) commonly found in code editors such as Visual Studio Code (VS Code) or Sublime Text.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

Outliner

Work with your lists like in Workflowy or Roam Research.

Emoji Toolbar

Quickly search for and insert emojis into your editor.