powered by
Use all available patterns in pat to search in vec, and return the matched elements in vec.
pat
vec
findPat(pat, vec)
A character vector of all matched strings.
character vector of patterns to match in vec
character vector where matches are sought
Rowan Haigh, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
local(envir=.PBSmodEnv,expr={ #find all strings with a vowel, or that start with a number print(findPat(c("[aeiou]", "^[0-9]"), c("hello", "WORLD", "1over"))) })
Run the code above in your browser using DataLab