Look for a key followed later by another key in the same block.
Section: Multiline and structured-text searches
Search a YAML block
bash
bash
rg -U 'image: .*\n(?:.*\n){0,5}pullPolicy:' deploy.yamlExplanation
Multiline search can quickly inspect structured config without a parser.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Multiline and structured-text searches
Search across line boundaries
Allow regex matches to span multiple lines.
Inspect filtering decisions
Show diagnostics about ignores, globs, and traversal.