Skip to content

GrepMatch

Represents a single grep match within a file.

Kind: an object, used in responses.

Every field is present in a response; empty ones are null.

FieldTypeDescription
lineinteger1-based line number where the match was found.
contentstringThe full content of the matching line.
beforestring[]Lines before the match (context). Empty if contextLines was 0.
afterstring[]Lines after the match (context). Empty if contextLines was 0.
{
"line": 0,
"content": "...",
"before": [
"..."
],
"after": [
"..."
]
}