I have variable names in the form:
PP_Sample_12.GT
or
PP_Sample-17.GT
I\'m trying to use string split to
Here's a gsub that will extract everything after the first _ and before the last .
gsub
_
.
x<-c("PP_Sample-12.GT","PP_Sample-17.GT") gsub(".*_(.*)\\..*","\\1", x, perl=T)