Skip to content
Prev 353623 / 398503 Next

String Matching

I haven't tested this, but what about:


df <- data.frame(mtch=c(matchString, string1, string2))

grep(searchString, df$mtch, ignore.case=FALSE)

Depending on what your next step is, you might prefer grepl.


Sometimes using fixed=TRUE in grep() helps.

-Don