diff options
author | Rory O’Kane <rory@roryokane.com> | 2019-04-16 17:21:40 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-04-16 17:21:40 -0400 |
commit | 6ffd434232b46df4f94bd3db9197f154aca7d2f1 (patch) | |
tree | e465a498534c41055a4b3e28b579cf5288c77319 | |
parent | 1f1cd9b467df73002d5042145693b0cec7b11e9b (diff) |
readme: mention --auto-hybrid-regex in advantages
This feature solves a major reason I was skeptical of using ripgrep, so
I think it’s good to mention it in the section about why one should use
it.
I use backreferences a lot, so I had previously thought that ripgrep
would provide no speed advantage over ag, since I would always have
`-P` enabled. But when I saw `--auto-hybrid-regex` in the 11.0.0
changelog, I learned that ripgrep can use it to speed up simple queries
while still allowing me to write backreferences.
PR #1253
-rw-r--r-- | README.md | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -108,7 +108,8 @@ increases the times to `2.640s` for ripgrep and `10.277s` for GNU grep. * 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 is enabled with `-P`. + regex engine. PCRE2 support can be enabled with `-P` (use PCRE2 always) or + `--auto-hybrid-regex` (use PCRE2 only if needed). * ripgrep supports searching files in text encodings other than UTF-8, such as UTF-16, latin-1, GBK, EUC-JP, Shift_JIS and more. (Some support for automatically detecting UTF-16 is provided. Other text encodings must be |