name_2 = gsub("(.+?)(?:\\..+)?", "\\1", "deriv.x")# your code goes hereprint(name_2)
Standard input is empty
[1] "deriv"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!