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
href="./i_am_going_to_mess_with_your_spider.htm"
or
href="../i_am_going_to_mess_with_your_spider_too.htm"
I have translated these into
href="http://www.i-feel-a-bit-creutzfeldt-jacob-ish.com/./i_am_going_to_mess_with_your_spider.htm"
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".
so the previous URL translated would become:
http://www.i-feel-a-bit-creutzfeldt-jacob-ish.coi_am_going_to_mess_with_your_spider.htm" See my problem?
Any help appreciated.