split methode with URL?
Split URl Functions:
Original url: "http://www.website.com/dir1/dir2/dir4/thefile.html"
My final string should be: "http://"http://www.website.com /dir1 /dir2 /dir4 /thefile.html
i was thinking of using the split method to do this, but i am not sure it can be done that way...
Anyone with hint?
You could split on '//' first.
Then split on '/'.
Add the slashes back in before or during display of the pieces.
Ok now this code has to actually insert a space every 20 characters
You might need a regular expressions guru to show you a superfast solution. I'm certainly not one of them.
Yeh, I think the split, join hacking around will probably get it done
thanks for the link, i might try this too
Object group(interval, str, ignoreWhiteSpace)
function inserts a string every number of characters