| matchOne | R Documentation | 
Search for first match to argument pattern within each element of a character vector. Returns corresponding substrings (compare stringr::str_match).
matchOne(string = NA, pattern = ".*", value = T, ...)
string | 
 Character vector where matches are sought.  | 
pattern | 
 Character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector.  | 
value | 
 Logical value. If T (default) returns substrings. Otherwise returns positions.  | 
matchOne(string=c("Hello world","Hello"),pattern="wo.*")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.