HI,
I have a string that looks like
/dir/dir1/filename.txt
I want to replace the "filename.txt" with some other name leaving the "/dir/dir1" intact so after the replace the string would look like
/dir/dir1/newfilename.txt
how would I do that using RegExp in Perl considering that I don't know the value of "filename"
Many Thanks
P.S : "filename.txt" and "newfilename.txt" have been used for the purpose of making things simple when asking the question the original filename will vary.