Extract Part of a String
Extract a part of a string, defined as regular expression.
- a character vector where matches are sought, or an object which can be coerced by
as.characterto a character vector.
- character string containing a regular expression (or character string for
fixed = TRUE) to be matched in the given character vector. Coerced by
as.characterto a character string if possible. If a character vector of length 2 or more is supplied, the first element is used with a warning. Missing values are not allowed.
txt <- c("G1:E001", "G2:E002", "G3:E003") # extract everything after the : StrExtract(":.*", txt)
Looks like there are no examples yet.