How can I use R to remove a file extension that is not alphanumeric extension -


this example of file name

mod09a1.a2000049.h19v11.005.2006268194400.hdf.sur_refl_day_of_year 

initially

mod09a1.a2000049.h19v11.005.2006268194400.hdf.sur_refl_day_of_year.tif 

i used function file_path_sans_ext remove ".tiff" still want remove ".sur_refl_day_of_year". need file name mod09a1.a2000049.h19v11.005.2006268194400.hdf only.

try:

sub("(\\.hdf).*", "\\1", myfilename) 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

android - Format a french phone number -