search_by_regex_tool
Search Obsidian notes using regular expressions to find complex patterns like URLs, code syntax, TODO comments, and structured data with advanced matching options.
Instructions
Search for notes using regular expressions for advanced pattern matching.
When to use:
Finding complex patterns (URLs, code syntax, structured data)
Searching with wildcards and special characters
Case-sensitive or multi-line pattern matching
Finding TODO/FIXME comments with context
When NOT to use:
Simple text search (use search_notes instead)
Searching by tags or properties (use dedicated tools)
Common patterns:
URLs: r"https?://[^\s]+"
Email: r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}"
TODO comments: r"(TODO|FIXME)\s*:.*"
Markdown headers: r"^#{1,6}\s+.*"
Code blocks: r"
\w*\n[\s\S]*?"
Returns: Notes containing regex matches with match details and context
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Regular expression pattern for advanced searches. Use for finding URLs, code patterns, TODO items, etc. | |
| flags | No | ||
| context_length | No | Characters to show around matches | |
| max_results | No | Maximum number of notes to return. Use smaller values for faster responses. | |
| ctx | No |