Wednesday, 4 September 2013

Find and remove partial link from existing href

Find and remove partial link from existing href

I have been finding examples on this but till now I am still so confuse
about getting to work for this.
I have an existing <a href="http://www.sitename.com/dir1/dir2"> and I need
to insert into this link with "upload" dir.
So the end result will be <a href="upload/dir2">
How do I remove http://www.sitename.com/dir1 and insert the "upload" into
the link?
Hope you guys understand what I am trying to do.
Any help would be greatly appreciated, thanks in advance.

No comments:

Post a Comment