x <- c("Folder//Subfolder/study30/01_study30_Baseline.xlsx", "Folder//study30/01_study30_6M.xlsx")sub("^(?:.*_)?([^_/]+)\\.xlsx$", "\\1", x)
Standard input is empty
[1] "Baseline" "6M"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!