Skip to content

Commit 4bff79d

Browse files
committed
Update docs
1 parent cc0a394 commit 4bff79d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ if (Preg::matchStrictGroups('{fo+}', $string, $matches))
9595
if (Preg::matchAllStrictGroups('{fo+}', $string, $matches))
9696
```
9797

98-
**Note:** This is generally safe to use as long as you do not have optional subpatterns (i.e. `(something)?` or `(something)*`).
98+
**Note:** This is generally safe to use as long as you do not have optional subpatterns (i.e. `(something)?`
99+
or `(something)*` or branches with a `|` that result in some groups not being matched at all).
99100
A subpattern that can match an empty string like `(.*)` is **not** optional, it will be present as an
100101
empty string in the matches. A non-matching subpattern, even if optional like `(?:foo)?` will anyway not be present in
101102
matches so it is also not a problem to use these with `*StrictGroups` methods.

0 commit comments

Comments
 (0)