one string named as: mytest.txt how can I remove the .txt and return the mytest only. i tried split substr, and grep didn't work it out, Thanks so lot -- View this message in context: http://r.789695.n4.nabble.com/String-truncate-tp2284045p2284045.html Sent from the R help mailing list archive at Nabble.com.