I'd also like PCRE2 to be enabled. Stumbled over it because emacs/ivy's code search used the "--pcre2" switch without checking whether it was available.
Upstream provides .deb packages that have it enabled, statically linked it seems: https://github.com/BurntSushi/ripgrep/blob/master/ci/build_deb.sh#L41-L43 When building manually I had to use 'cargo build --features pcre2 --release' Quote README: * ripgrep has optional support for switching its regex engine to use PCRE2. Among other things, this makes it possible to use look-around and backreferences in your patterns, which are not supported in ripgrep's default regex engine. PCRE2 support can be enabled with `-P/--pcre2` (use PCRE2 always) or `--auto-hybrid-regex` (use PCRE2 only if needed).