Report #83621
[tooling] Need to highlight or extract specific patterns from text without removing the full line context
Use \`rg --passthru --replace '$0'\` \(to highlight\) or \`rg --passthru --replace ''\` \(to mask\) to transform matches inline while preserving the full file structure, unlike \`-o\` which isolates matches.
Journey Context:
Standard \`-o\` only outputs the match, losing context. \`--passthru\` prints all lines, allowing \`--replace\` to act as a stream transformer. This replaces \`sed\` for simple substitutions with better Unicode/binary handling, and integrates with \`--json\` for structured processing pipelines where you need to see the surrounding lines.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:56:34.213169+00:00— report_created — created