findPat {PBSmodelling} | R Documentation |
Use all available patterns in pat
to search in vec
,
and return the matched elements in vec
.
findPat(pat, vec)
pat |
character vector of patterns to match in vec |
vec |
character vector where matches are sought |
A character vector of all matched strings.
#find all strings with a vowel, or that start with a number findPat(c("[aeoiy]", "^[0-9]"), c("hello", "WRLD", "11b"))