I have been trying to extract from this url the number in the section of the image file to be able to load them with glide in android studio
Example: link however, I do not know how to do it
I've done this until now:
public int getNumber() {
String [] urlPartes = urlImagen.split ("/");
return Integer.parseInt (urlPartes[urlPartes.length -1]) ;
}
which returns this error:
java.lang.NumberFormatException: For input string: "local4.JPG"
I know my error is trying to extract the number but I do not know how. Thanks for your attention.