Search data that uses NUL delimiters instead of newlines.
Section: Pipes and stdin
Treat input as NUL-separated data
bash
bash
printf 'alpha\0beta\0gamma\0' | rg -z 'beta'Explanation
`-z` is helpful when working with filenames or generated data that uses NUL separators.
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 Pipes and stdin
Search logs from another command
Filter live or recent command output with rg.
Search file lists or command results
Use another command to produce candidate text and rg to filter it.
Emit machine-readable JSON results
Use structured output for editor integrations and automation.
Search recursively in the current directory
Search for a pattern using ripgrep's recursive defaults.
List only file names with matches
Return matching file paths without printing the matching lines.