Given vectors of strings of arbitrary length content <- c("abc", "def") searchset <- c("a", "abc", "abcdef", "d", "def", "defghi")
Is it possible to determine the content String set that matches the searchset in the sense of 'startswith' ? This would be a vector of all strings in content that start with the string of any of the strings in the searchset. In the little example here, this would be: result <- c("abc", "abc", "def", "def") Best, Ralf ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.