From 93802c0308c51091de7f9759dbf2c87c355d2d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?James=20Hayes=20=28n=C3=A9=20McMahon=29?= Date: Wed, 6 May 2026 13:35:19 +0100 Subject: [PATCH 1/2] Fix typo in documentation for extract.R --- R/extract.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/extract.R b/R/extract.R index 5dc80672..82733850 100644 --- a/R/extract.R +++ b/R/extract.R @@ -1,7 +1,7 @@ #' Extract the complete match #' #' `str_extract()` extracts the first complete match from each string, -#' `str_extract_all()`extracts all matches from each string. +#' `str_extract_all()` extracts all matches from each string. #' #' @inheritParams str_count #' @param group If supplied, instead of returning the complete match, will @@ -12,7 +12,7 @@ #' * `FALSE` (the default): returns a list of character vectors. #' * `TRUE`: returns a character matrix. #' @return -#' * `str_extract()`: an character vector the same length as `string`/`pattern`. +#' * `str_extract()`: a character vector the same length as `string`/`pattern`. #' * `str_extract_all()`: a list of character vectors the same length as #' `string`/`pattern`. #' @export From 98e41d5a212728a5ab2f3c6928986b4ed09f45f1 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 26 Oct 2026 15:58:25 -0400 Subject: [PATCH 2/2] Redocument --- man/str_extract.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/str_extract.Rd b/man/str_extract.Rd index 1c48856c..cd494e08 100644 --- a/man/str_extract.Rd +++ b/man/str_extract.Rd @@ -38,14 +38,14 @@ return the matched text from the specified capturing group.} } \value{ \itemize{ -\item \code{str_extract()}: an character vector the same length as \code{string}/\code{pattern}. +\item \code{str_extract()}: a character vector the same length as \code{string}/\code{pattern}. \item \code{str_extract_all()}: a list of character vectors the same length as \code{string}/\code{pattern}. } } \description{ \code{str_extract()} extracts the first complete match from each string, -\code{str_extract_all()}extracts all matches from each string. +\code{str_extract_all()} extracts all matches from each string. } \examples{ shopping_list <- c("apples x4", "bag of flour", "bag of sugar", "milk x2")