
x
, return only the elements that do
not satisfy a particular regular expression statement;
ie, remove all elements that are matched by
pattern
.ngrep(pattern, x, ...)
x
that did not match the pattern
suppliedgrep
returns the location
of matches, rather than the actual matches themselves.
ngrep
only returns matched elements, not the
location of matches.grep
regex
some_files <- c("output_file.tar.gz", "old_log1.txt", "old_log2.txt")
## get the non-log files
files_I_want <- ngrep( "_log[0-9]+\\.txt$", some_files )
Run the code above in your browser using DataLab