Hi Daren. you could try something like:
strings[setdiff(1:length(strings), grep("ba", strings))] ?grep as well as ?regexpr will help as well! Bernhard 2008/6/19 Daren Tan <[EMAIL PROTECTED]>: > > > For example, > > strings <- c("aaaa", "bbbb","ccba"). > > How to get "aaaa", "bbbb" that do not contain "ba" ? ______________________________________________ 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.