I have what is probably a really dumb grep in R question. Apologies, because this seems like it should be so easy - I\'m obviously just missing something.
grep
You can do something like this:
pat <- ".*\\.D([0-9]+)\\.LIS.*" sub(pat, "\\1", alice)
If you only want the subset of alice where your pattern matches, try this:
alice
pat <- ".*\\.D([0-9]+)\\.LIS.*" sub(pat, "\\1", alice[grepl(pat, alice)])