i <- "piante_venere.csv" gsub("^.*_(.*)\\.csv$", "\\1", i) ----- A R learner. -- View this message in context: http://r.789695.n4.nabble.com/gsub-tp2316443p2316550.html Sent from the R help mailing list archive at Nabble.com.