I have a string like this
foldername/pic.jpg
How can I remove this part /pic so the new string will become foldername.jpg?
EDIT: I want to replace any string that starts with / and end with . with a dot (.) so the new file name only contains the foldername.jpg
s.replace("/pic", "")/pic?