File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -1568,10 +1568,15 @@ impl<'h> From<Match<'h>> for core::ops::Range<usize> {
15681568
15691569/// Represents the capture groups for a single match.
15701570///
1571- /// Capture groups refer to parts of a regex enclosed in parentheses. They can
1572- /// be optionally named. The purpose of capture groups is to be able to
1573- /// reference different parts of a match based on the original pattern. For
1574- /// example, say you want to match the individual letters in a 5-letter word:
1571+ /// Capture groups refer to parts of a regex enclosed in parentheses. They
1572+ /// can be optionally named. The purpose of capture groups is to be able to
1573+ /// reference different parts of a match based on the original pattern. In
1574+ /// essence, a `Captures` is a container of [`Match`] values for each group
1575+ /// that participated in a regex match. Each `Match` can be looked up by either
1576+ /// its capture group index or name (if it has one).
1577+ ///
1578+ /// For example, say you want to match the individual letters in a 5-letter
1579+ /// word:
15751580///
15761581/// ```text
15771582/// (?<first>\w)(\w)(?:\w)\w(?<last>\w)
Original file line number Diff line number Diff line change @@ -1573,10 +1573,15 @@ impl<'h> From<Match<'h>> for core::ops::Range<usize> {
15731573
15741574/// Represents the capture groups for a single match.
15751575///
1576- /// Capture groups refer to parts of a regex enclosed in parentheses. They can
1577- /// be optionally named. The purpose of capture groups is to be able to
1578- /// reference different parts of a match based on the original pattern. For
1579- /// example, say you want to match the individual letters in a 5-letter word:
1576+ /// Capture groups refer to parts of a regex enclosed in parentheses. They
1577+ /// can be optionally named. The purpose of capture groups is to be able to
1578+ /// reference different parts of a match based on the original pattern. In
1579+ /// essence, a `Captures` is a container of [`Match`] values for each group
1580+ /// that participated in a regex match. Each `Match` can be looked up by either
1581+ /// its capture group index or name (if it has one).
1582+ ///
1583+ /// For example, say you want to match the individual letters in a 5-letter
1584+ /// word:
15801585///
15811586/// ```text
15821587/// (?<first>\w)(\w)(?:\w)\w(?<last>\w)
You can’t perform that action at this time.
0 commit comments