I have a code which I wanted to split based on the forward slash \"/\".
Whenever I have a regex split based on \"////\" it never splits and gives me the whole string
Java might return a null pointer so you need to wrap this with a try catch
try { String[] temp = imageFilenameOriginal.split("/"); } catch (Exception ex){ errorMessage = ex.getMessage(); }
The compiler is much happier this way.