summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-08-01 17:31:49 -0400
committerAndrew Gallant <jamslam@gmail.com>2019-08-01 17:32:44 -0400
commit01e8e1162177b4402893d4b60972d1031149e650 (patch)
treedb9d3dc18309a3810ca78c1289ccdb193cb6aebb
parent9268ff8e8db179a484810cfbc40f3a8dba74ccaf (diff)
doc: improve PCRE2 failure mode documentation
If a user tries to search for an explicit `\n` character in a PCRE2 regex, ripgrep won't report an error and instead will (likely) silently fail to match. Fixes #1261
-rw-r--r--src/app.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/app.rs b/src/app.rs
index d69d5cd7..0733c80b 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1995,7 +1995,12 @@ or backreferences.
Note that PCRE2 is an optional ripgrep feature. If PCRE2 wasn't included in
your build of ripgrep, then using this flag will result in ripgrep printing
-an error message and exiting.
+an error message and exiting. PCRE2 may also have worse user experience in
+some cases, since it has fewer introspection APIs than ripgrep's default regex
+engine. For example, if you use a '\n' in a PCRE2 regex without the
+'-U/--multiline' flag, then ripgrep will silently fail to match anything
+instead of reporting an error immediately (like it does with the default
+regex engine).
Related flags: --no-pcre2-unicode