Suppose I have two vectors of strings:
vec1 <- c("hellohi", "good", "goodafternoonabc")
vec2 <- c("helloworld", "goodmorning", "abc")
Is there a function that matches patterns within the two vectors, such that :
function(vec1, vec2)
return matches : "hello", "good", "good", "abc" ? Thanks in advance.