Java string.replaceFirst / string.replaceLast regexp to remove everything after the second braid from the end
I have a path like this / my / long / path / which is / will / never / ends /. I would like to remove everything after the second slash from the end (so the output would be something like / my / long / path / which / will / never /). How could I do this? I can only use javas String.replaceFirst or String.replaceAll.
thank
+3
source to share