find_regex_position
Locate regex pattern matches in a file with precise line and column positions. Supports absolute file paths and returns detailed match data for text analysis and LSP-like functionality.
Instructions
Find the positions (line and column) of regex pattern matches in a file. Returns an array of matches with their positions. Line and column numbers are 0-indexed (first line is 0). Each match includes: match (matched text), line (starting line), column (starting column), endLine (ending line), and endColumn (ending column, exclusive). IMPORTANT: The path parameter must be an absolute path. Relative paths are not supported.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
path | Yes | Absolute path to the file to search in. Relative paths are not supported. | |
regex | Yes | Regular expression pattern to search for |