search_sourcegraph_regex
Search code using regular expressions with automatic regexp pattern type. Apply filters to narrow results by repository or language for precise code search.
Instructions
Search code using regular expressions. Automatically sets patternType to 'regexp' for regex queries. Use this for complex pattern matching.
Examples:
'class \w+Service' - Find all service classes
'def (get|set)_\w+' - Find getter/setter methods
'TODO|FIXME|HACK' - Find code comments
'function \w+(.*) {' - Find function declarations
Tips:
Use filters parameter for additional constraints
Combine with repo:, file:, and lang: filters
Remember to escape backslashes in regex patterns
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Regular expression pattern to search for | |
| filters | No | Additional filters (e.g., 'repo:owner/name lang:python') | |
| max_results | No | Maximum number of results (default: 10) |