Get AI summaries of any video or article — Sign up free
Obsidian Basics: Search & Starred Search thumbnail

Obsidian Basics: Search & Starred Search

Productivity Guru·
5 min read

Based on Productivity Guru's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Obsidian 0.8.0 adds regex support to search, enabling pattern-based matching for structured data.

Briefing

Obsidian’s search just got much more powerful with version 0.8.0, adding regex support so users can match patterns instead of only plain words. The practical payoff is faster, more precise retrieval—whether filtering by file name or path, enforcing case rules, or hunting structured data like dates, amounts, phone numbers, emails, URLs, and even sleep logs.

Search starts from the magnifying glass in the top-left, where three controls shape results before any advanced syntax kicks in. “Collapse results” switches between showing only matching node names and showing the lines containing matches. “Match case” toggles case-sensitive matching, while “Explain search term” reveals what the query is doing in plain language—useful when debugging complex regex patterns.

Basic searching remains straightforward: typing a word returns notes containing that word anywhere in the file. Multiple words default to an “anywhere” match across the note, but quoting a phrase forces consecutive terms (e.g., wrapping BCP together in quotes). For more complex logic, boolean operators let users combine or exclude matches. Using “or” returns notes containing either term. A leading “-” negates results that contain a term, and parentheses group conditions so “A and B” can be combined with exclusions like “not C.”

Four special operators extend search beyond the text body. “file:” searches the file name, “path:” searches the absolute file path from the vault root, “match case:” enforces case sensitivity for that query, and “ignore case:” flips it to case-insensitive matching. These operators can be layered with the rest of the search syntax.

The biggest change is regex: patterns are wrapped in slashes, and character classes and metacharacters require careful escaping. The transcript lists common classes such as “.” (any character except newline), “\d” (digits), “\D” (non-digits), “\w” (word characters), “\W” (non-word characters), “\s” (whitespace), and “\S” (non-whitespace). Square brackets define sets (e.g., [abc]) and negated sets use a caret (e.g., [^abc]). Quantifiers control repetition: “*” means 0 or more, “+” means 1 or more, “?” means 0 or 1, and curly braces specify exact counts or ranges like {1,3}.

Examples show how regex becomes a data tool. Escaping “$” allows matching dollar amounts like “$25” or “$125” using “\d{1,3}.” Phone numbers are handled by escaping “+” and combining country codes with digit ranges (e.g., “\+91 \d{10}” and variants for other formats). Email matching uses letter ranges and repetition (e.g., [a-z]+@[a-z]+\.[a-z]+), while URLs start with “http” and optionally “s,” then use word-character runs and escaped dots to capture domains. Even personal tracking is addressed: sleep entries are matched with patterns like “\d{1,2}H \d{1,2}M,” with optional markers to include days where hours or minutes are missing (using “?” to make parts optional).

Finally, the workflow improvement isn’t just search syntax: a “Star” plugin can save the current search so the same regex can be rerun later with a single click—turning one-off queries into reusable filters for recurring tasks like finding all sleep notes.

Cornell Notes

Obsidian 0.8.0 upgrades search with regex, letting users match structured patterns instead of only literal words. Search can be tuned with controls like collapsing results, case sensitivity, and an “Explain search term” view that clarifies what a query does. Boolean logic (“or”, “-” for negation, parentheses for grouping) and special operators (“file:”, “path:”, “match case:”, “ignore case:”) help narrow results by name, location, and casing. Regex patterns use slashes and rely on escaped metacharacters plus character classes (e.g., \d, \w, \s) and quantifiers (*, +, ?, {m,n}). Saved searches via the Star plugin make complex filters reusable.

How do users switch between basic keyword search and more controlled matching in Obsidian search?

Basic search works by typing terms: a single word matches anywhere in a note, and multiple words default to matching notes containing those words anywhere. To force consecutive terms, wrap the phrase in quotes. For more control, boolean operators refine results: “or” matches either term, “-” negates notes containing a term, and parentheses group conditions (e.g., (A or B) -C).

What do the three search bar settings do, and how can they help when debugging queries?

The magnifying-glass search UI includes: (1) “Collapse results,” which toggles between showing only matching node names and showing the lines where matches occur; (2) “Match case,” which turns case-sensitive matching on or off; and (3) “Explain search term,” which translates the query into plain language so users can verify how their search term (including regex) is being interpreted.

How do special operators change what part of a note gets searched?

Special operators target metadata rather than just note text. “file:” searches the file name (e.g., file:"2020 80" to match an exact filename pattern). “path:” searches the absolute path from the vault root (e.g., path:journal/...). “match case:” and “ignore case:” apply casing rules to the query, letting the same text pattern behave differently depending on letter case.

What are the core regex building blocks mentioned—character classes and quantifiers—and why do they matter?

Character classes define what characters can appear: “\d” digits, “\D” non-digits, “\w” word characters, “\s” whitespace, and “.” any character except newline. Square brackets create sets like [abc], and caret negates them like [^abc]. Quantifiers control repetition: “*” (0+), “+” (1+), “?” (0 or 1), and “{m,n}” for exact or ranged counts. Together they let users match patterns like dollar amounts (\$\d{1,3}) or phone numbers (\+91 \d{10}).

How can regex handle optional parts of a pattern, such as missing sleep hours or minutes?

Optional matching uses “?” after the relevant token. For sleep logs formatted like “1-2 digits H” and “digits M,” the pattern can make the “H” and the separating space optional so days without hours still match. The transcript’s approach uses question marks to allow entries where sleep is recorded only partially (e.g., matching “<1R” cases by making the hours/minutes portion optional).

What’s the practical benefit of the Star plugin in this workflow?

After enabling the Star plugin in Settings → Plugins, a star icon appears to save the current search. That means complex regex queries—like “all sleep notes”—can be rerun instantly by clicking the saved search, instead of retyping and re-validating the expression each time.

Review Questions

  1. When would quotes be necessary in Obsidian search, and how do they differ from default multi-word searching?
  2. Explain how “-” and parentheses change boolean search results compared with using “or” alone.
  3. Give one example of how a character class (like \d or \w) and a quantifier (like {1,3} or +) work together to match a structured value.

Key Points

  1. 1

    Obsidian 0.8.0 adds regex support to search, enabling pattern-based matching for structured data.

  2. 2

    Search settings let users control result display (collapse vs lines), case sensitivity, and query transparency via “Explain search term.”

  3. 3

    Quotes force consecutive phrase matching, while boolean operators (“or”, “-”, parentheses) refine inclusion and exclusion logic.

  4. 4

    Special operators like “file:” and “path:” target filenames and absolute vault paths, not just note text.

  5. 5

    Regex patterns use slashes and require careful escaping of metacharacters (e.g., “$”, “+”, “.”) to match literal symbols.

  6. 6

    Character classes (\d, \w, \s, and set brackets) and quantifiers (*, +, ?, {m,n}) are the main tools for building reliable regex filters.

  7. 7

    The Star plugin can save complex searches so recurring queries (like finding all sleep entries) become one-click actions.

Highlights

Regex patterns are wrapped in slashes, turning search into a pattern matcher rather than a literal keyword lookup.
Boolean logic combines cleanly with regex: “or” broadens matches, “-” removes unwanted notes, and parentheses control precedence.
Character classes like \d and \w plus quantifiers like {1,3} make it practical to match real-world formats such as money, phone numbers, emails, and URLs.
Optional regex parts using “?” help match incomplete entries—useful for logs where some fields may be missing.
Saving searches with the Star plugin turns one-time regex work into a reusable filter for daily workflows.

Topics

Mentioned

  • regex