Split the string on forward slash

There is no need to escape forward slashes. Your code works fine if you just do:

String[] paths = path.split("https://stackoverflow.com/");

Leave a Comment