Obsidian Basics: Search & Starred Search
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.
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?
What do the three search bar settings do, and how can they help when debugging queries?
How do special operators change what part of a note gets searched?
What are the core regex building blocks mentioned—character classes and quantifiers—and why do they matter?
How can regex handle optional parts of a pattern, such as missing sleep hours or minutes?
What’s the practical benefit of the Star plugin in this workflow?
Review Questions
- When would quotes be necessary in Obsidian search, and how do they differ from default multi-word searching?
- Explain how “-” and parentheses change boolean search results compared with using “or” alone.
- 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
Obsidian 0.8.0 adds regex support to search, enabling pattern-based matching for structured data.
- 2
Search settings let users control result display (collapse vs lines), case sensitivity, and query transparency via “Explain search term.”
- 3
Quotes force consecutive phrase matching, while boolean operators (“or”, “-”, parentheses) refine inclusion and exclusion logic.
- 4
Special operators like “file:” and “path:” target filenames and absolute vault paths, not just note text.
- 5
Regex patterns use slashes and require careful escaping of metacharacters (e.g., “$”, “+”, “.”) to match literal symbols.
- 6
Character classes (\d, \w, \s, and set brackets) and quantifiers (*, +, ?, {m,n}) are the main tools for building reliable regex filters.
- 7
The Star plugin can save complex searches so recurring queries (like finding all sleep entries) become one-click actions.