myvec<-c("increa_0_1-1","increa_9_25-112","increa_25-50-76" )sub("^[^_]*_(\\d+).*", "\\1", myvec)
Standard input is empty
[1] "0" "9" "25"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!