powered by
This function simply joins a vector of regex characters by union, and produces a single character regex in the form of (foo)|(bar).
(foo)|(bar)
joinRegex(...)
a character of the unioned regex
character vectors of the regex expressions to join. Both vectors and individual characters of any length will work
joinRegex(c("^foo", "bar$")) joinRegex("^foo", "bar$", "[bB]az")
Run the code above in your browser using DataLab