Skip to content

Commit 3fdb280

Browse files
committed
Update docs
1 parent ce2b784 commit 3fdb280

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ if (Preg::matchStrictGroups('{fo+}', $string, $matches))
9191
if (Preg::matchAllStrictGroups('{fo+}', $string, $matches))
9292
```
9393

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

0 commit comments

Comments
 (0)