Skip to main content
Glama
adrienthebo
by adrienthebo

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

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRegular expression pattern for advanced searches. Use for finding URLs, code patterns, TODO items, etc.
flagsNo
context_lengthNoCharacters to show around matches
max_resultsNoMaximum number of notes to return. Use smaller values for faster responses.
ctxNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adrienthebo/obsidian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server