What i would like to do is scan a chunk of text which will have urls in it.
Some of urls will have the HTML # (jump) in the href and some will not.
All urls will have target="blank", the urls with the # i would like to remove target="blank".
The HTML #value will be different all the time and the URL will also be different all the time.
Im horrible with preg_replace()HTML Code:<a target='blank' href="#Jump">bla</a> # remove - target <a target='blank' href="http://url.com#Jump">bla</a> # remove - target <a target='blank' href="http://url.com">bla</a> # keep- target <a target='blank' href="http://ect.com">bla</a> # keep- target
Could someone give me a helping hand and post an example of how to do this.
Thanks so much.
_



Reply With Quote