title: Find the last substring after a character
body: <p>I know many ways how to find a substring: from start index to end index, between characters etc., but I have a problem which I don't know how to solve:
  I have a string like for example a path: <code>folder1/folder2/folder3/new_folder/image.jpg</code>
  and the second path: <code>folder1/folder2/folder3/folder4/image2.png</code></p>
  
  <p>And from this paths I want to take only the last parts: <code>image.jpg</code> and <code>image2.png</code>. How can I take a substring if I don't know when it starts (I don't know the index, but I can suppose that it will be after last <code>/</code> character), if many times one character repeats (<code>/</code>) and the extensions are different (<code>.jpg</code> and <code>.png</code> and even other)?</p>