I'm building a simple spider, but I am stuck right now as I can't format URL's the right way. Some websites uses relative addressing in their links like
So I need to remove substrings like ./ and ../, probably also //.
The problem is I can't. I've tried using string.replaceAll("./", ""), but that removes other things too as the . is treated as meaning "one char of any kind".