Report #82080
[tooling] Extracting specific text patterns requires fragile sed/awk pipelines
Use \`rg -oN --replace '$1' 'pattern \(capture\_group\)'\` to output only captured groups. The \`-o\` prints only matches, \`-N\` omits line numbers \(essential for piping\), and \`--replace\` supports numbered capture groups like \`$1\`, \`$2\`.
Journey Context:
Traditional pipelines use \`grep -o\` piped to \`sed 's///'\` or \`cut\`, which fail on regex metacharacters or Unicode. Ripgrep's --replace works atomically with -o, handling binary files safely and respecting .gitignore by default. This eliminates fork-exec overhead of separate sed processes and correctly handles paths with spaces without \`-print0\` workarounds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:22:06.449245+00:00— report_created — created