From 00cdceeedc257e63114a1839db07e15b1835da7e Mon Sep 17 00:00:00 2001 From: mrl5 <31549762+mrl5@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:54:55 +0200 Subject: [PATCH] docs(lib): improve section for empty matches this improvement is a consequence of the Q&A discussion from https://github.com/rust-lang/regex/discussions/896 --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 3e3b0a007..6b95739c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -353,6 +353,9 @@ $ the end of text (or end-of-line with multi-line mode) \B not a Unicode word boundary +The empty regex is valid and matches the empty string. For example, the empty +regex matches `abc` at positions `0`, `1`, `2` and `3`. + ## Grouping and flags