Im a beginner to java and trying to build my own weather app. When getting the temperature, the output is
/?4°
or
/?-4°
Now I only need to get the temperature (4° or -4°). How can I achieve this? I already tried
str.replace('?',' ')
But that does nothing. My problem with
str.replaceAll('\\D', ' ')
is, that it also removes the - sign. I hope you can help me.