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

MatchSyntax

rivea0rivea0317 downloads

A flexible, regex-like lookups for your notes.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates5

A flexible, "regex-like" lookups for your notes, using the compromise match syntax.

MatchSyntax will highlight the parts of the text in your active note that match your "match-syntax" query.

Examples

Part-of-speech tags can be used for searches of grammatical parts in a note. The syntax for looking for all the adjectives followed by plural words can look like this:

https://github.com/user-attachments/assets/ff264c14-853b-473a-8b8d-c3d76994bd9a

You can do regex searches with // syntax. Let's say we want to look for any word that starts with natur and is followed by either e or al:

https://github.com/user-attachments/assets/f10bc077-7240-44c4-8aa0-0d332e20dcb6

It's always advised to be careful with regex. This will also be slower than other types of lookups.

MatchSyntax is flexible, so you can combine different types of matches. Let's say we first searched for all nouns that are followed after the word "spiritual." Then, we might realize we don't want the plural nouns. So instead, we can use an AND syntax (&&) and negative matching (!) to indicate we want to exclude plural nouns:

https://github.com/user-attachments/assets/89b3b70b-a7f9-47c8-b542-c88d7200d301

[!NOTE] MatchSyntax heavily depends on the compromise library. The matching works only with English grammar; although compromise has some "work-in-progress" for other languages, there is only English support for this plugin at the moment.

Types of matches

MatchSyntax supports most types of compromise matches that are listed below, you can also check out its documentation.

Word-matches

Direct lookups.

Tag-matches (#)

Lookups using part-of-speech tagging.

Supported tags:

#Noun
    #Singular
        #Person
            #FirstName
                #MaleName
                #FemaleName
            #LastName
    #Place
        #Country
        #City
        #Region
        #Address
    #Organization
        #SportsTeam
        #Company
        #School
    #ProperNoun
    #Honorific
    #Plural
    #Uncountable
    #Pronoun
    #Actor
    #Activity
    #Unit
    #Demonym
    #Possessive
#Verb
    #PresentTense
        #Infinitive
        #Gerund
    #PastTense
    #PerfectTense
    #FuturePerfect
    #Pluperfect
    #Copula
    #Modal
    #Participle
    #Particle
    #PhrasalVerb
#Value
    #Ordinal
    #Cardinal
        #RomanNumeral
    #Multiple
    #Fraction
    #TextValue
    #NumericValue
    #Percent
    #Money
#Date
    #Month
    #WeekDay
    #RelativeDay
    #Year
    #Duration
    #Time
    #Holiday
#Adjective
    #Comparable
    #Comparative
    #Superlative
#Contraction
#Adverb
#Currency
#Determiner
#Conjunction
#Preposition
#QuestionWord
#Pronoun
#Expression
#Abbreviation
#Url
#HashTag
#PhoneNumber
#AtMention
#Emoji
#Emoticon
#Email
#Auxiliary
#Negative
#Acronym

See more in the compromise documentation.

Wildcard-matches (./*)

The . character means any one term.

The * character means zero or more terms.

Greedy-match (+)

The+ character at the end of a tag (or .) implies the match will continue with repeated consecutive matches, as far as it can.

Optional matching (?)

The ? character at the end of a word means it is nice to have, but not necessary.

Options list (OR logic)

(word1|word2) parentheses allow listing possible matches for the word (OR logic).

RegEx-match (/<reg>/)

JavaScript regular-expressions using the /myregex/ syntax.

Note: RegEx matches should be carefully used as they can be slower than other types of lookups.

First/Last (^/$)

Something should be in the start, or end of a match.

Negative (!)

Something not-match with a leading ! character.

Range ({min,max})

A maximum, minimum number of wildcard terms.

Prefix, suffix, infix

Sub-word matches, with the regex / / characters.

AND logic (&&)

AND logic using two match statements.

@ methods

  • @hasQuote
  • @hasComma
  • @hasPeriod
  • @hasExclamation
  • @hasQuestionMark
  • @hasEllipses
  • @hasSemicolon
  • @hasColon
  • @hasSlash
  • @hasHyphen
  • @hasDash
  • @hasContraction
  • @isAcronym
  • @isKnown
  • @isUpperCase
  • @isTitleCase

Fuzzy-matches (~)

Text-matching using ~ characters. Damerau–Levenshtein distance is used to compute approximate string matches.

See more in the compromise documentation.

Installation

In Obsidian, you can go to Settings → Community plugins → Browse. Then, search for "MatchSyntax" and click Install.

Or, alternatively, you can clone this repository, and move it to your vault's .obsidian/plugins directory. From there, run:

npm run build

Then, go to Settings → Community plugins, and activate MatchSyntax under Installed Plugins.

Usage

MatchSyntax provides two commands: "Enter match syntax" and "Clear match highlights." You can choose "Enter match syntax" to write your syntax and click "Find matches" to see the matched parts of the active note.

You can bind hotkeys for the commands by going to Community plugins, find MatchSyntax in Installed Plugins, and choosing "Hotkeys" button.

Highlights are cleared automatically when there is a change in editor. You can override this behavior by setting "Manually clear the highlights" on inside plugin settings.

TODO and Ideas

  • Custom tags
  • Add setting to display the number of matches in the status bar
  • Add a widget to the editor for input and clearing highlights

License

GPLv3

73%
HealthGood
ReviewSatisfactory
About
Highlight parts of the active note that match flexible "match-syntax" queries powered by the compromise grammar. Use word matches, part-of-speech tags (#Noun, #Verb, etc.), regex (//) and combine operators (&&, !) to build precise searches. Limit searches to English.
SearchAnnotationLanguages
Details
Current version
1.2.0
Last updated
10 months ago
Created
Last year
Updates
5 releases
Downloads
317
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
GPL-3.0
Report bugRequest featureReport plugin
Author
rivea0rivea0
rivea0.github.io
GitHubrivea0
  1. Community
  2. Plugins
  3. Search
  4. MatchSyntax

Related plugins

Occura

Find and highlight all occurrences of selected text in notes, similar to Notepad++ or IDEs.

Japanese Novel Ruby

Treat ruby(Furigana) ​​marks commonly used in Japanese novels

Fuzzy Chinese Pinyin

Fuzzy search using Chinese Pinyin.

Omnisearch

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

Smart Connections

AI link discovery copilot. See related notes as you write. Lookup using semantic (vector) search across your vault. Zero-setup local model for embeddings, no API keys, private.

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

Image Converter

Convert, compress, resize, annotate, markup, draw, crop, rotate, flip, align, drag-resize, rename with variables, and batch process images: WEBP, JPG, PNG, HEIC, TIF

Simplified Chinese Word Splitting

Adds Simplified Chinese word splitting support for the editor and Vim mode.

Quiet Outline

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

HiNote

Add comments to highlighted notes, use AI for thinking, and flashcards for memory.