diff --git a/src/re_bytes.rs b/src/re_bytes.rs index 7f372ebb2..245447b12 100644 --- a/src/re_bytes.rs +++ b/src/re_bytes.rs @@ -877,7 +877,7 @@ impl CaptureLocations { self.0.pos(i) } - /// Returns the total number of capturing groups. + /// Returns the total number of capture groups (even if they didn't match). /// /// This is always at least `1` since every regex has at least `1` /// capturing group that corresponds to the entire match. @@ -979,7 +979,7 @@ impl<'t> Captures<'t> { expand_bytes(self, replacement, dst) } - /// Returns the number of captured groups. + /// Returns the total number of capture groups (even if they didn't match). /// /// This is always at least `1`, since every regex has at least one capture /// group that corresponds to the full match. diff --git a/src/re_unicode.rs b/src/re_unicode.rs index 46e70f218..53e7804bb 100644 --- a/src/re_unicode.rs +++ b/src/re_unicode.rs @@ -887,7 +887,7 @@ impl CaptureLocations { self.0.pos(i) } - /// Returns the total number of capturing groups. + /// Returns the total number of capture groups (even if they didn't match). /// /// This is always at least `1` since every regex has at least `1` /// capturing group that corresponds to the entire match. @@ -989,7 +989,7 @@ impl<'t> Captures<'t> { expand_str(self, replacement, dst) } - /// Returns the number of captured groups. + /// Returns the total number of capture groups (even if they didn't match). /// /// This is always at least `1`, since every regex has at least one capture /// group that corresponds to the full match.