regex_search
Match a JavaScript regular expression against the body of every file in your project or knowledge base. Get per-file hits with line numbers for substrings, URLs, or code identifiers that full-text search misses.
Instructions
Match a JS regex against the body of every file in scope (project, KB, or all) and return per-file hits with line numbers. Slower than FTS search because it reads each file's content; use only when FTS misses substrings, URLs, or code identifiers. Read-only; no side effects, auth, or rate limits. Capped at 500 files / 10 hits per file by default; the response reports files_truncated and per-file truncation so the agent can re-scope. project_id: null = KB only; omit = everywhere. Invalid regex throws.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | JavaScript RegExp source | |
| project_id | No | Scope to one project, null for KB-only, omit for everything | |
| case_insensitive | No | ||
| max_files | No | Cap on files scanned (default 500) | |
| max_matches_per_file | No | Per-file hit cap (default 10) |