Skip to content

Commit 159a63c

Browse files
authored
doc: add a note about the empty regex
This improvement is a consequence of the Q&A discussion from rust-lang#896 PR rust-lang#897
1 parent fc6f5cc commit 159a63c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ $ the end of text (or end-of-line with multi-line mode)
353353
\B not a Unicode word boundary
354354
</pre>
355355
356+
The empty regex is valid and matches the empty string. For example, the empty
357+
regex matches `abc` at positions `0`, `1`, `2` and `3`.
358+
356359
## Grouping and flags
357360
358361
<pre class="rust">

0 commit comments

Comments
 (0)