Compare default engine vs PCRE2 behavior.
Section: Debug missing or surprising results
Verify advanced regex needs
bash
bash
rg '(?<=id=)\d+' file.txt && rg -P '(?<=id=)\d+' file.txtExplanation
If the default engine fails on look-around or backreferences, switch to PCRE2.
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 Debug missing or surprising results
Inspect filtering decisions
Show diagnostics about ignores, globs, and traversal.
See what happens with binary detection
Override binary skipping during diagnosis.
Audit ignore-file influence
Run without ignore support to compare results.
Use trace logging for deeper internals
Emit more verbose debugging than `--debug`.