search for: filename_1_def

Displaying 1 result from an estimated 1 matches for "filename_1_def".

2011 Oct 05
3
help with regexp
Dear list memebers, I am stuck with using regular expressions. Imagine I have a vector of character strings like: test <- c('filename_1_def.pdf', 'filename_2_abc.pdf') How could I use regexpressions to extract only the 'def'/'abc' parts of these strings? Some try from my side yielded no results: testresults <- grep('(?<=filename_[[:digit:]]_).{1,3}(?=.pdf)', perl = TRUE, value = TRUE) Some...