Is there any way to make shorten this code here? Like… make it do all of that in just a couple splits?
as = fixmsg.match(/<a href=”/i);
if (as != “null”) {
as2 = fixmsg.split(/<a href=”/i);
as3 = as2.join(“”);
as4 = as3.split(/</a>/i);
for (i=0; i<as4.length; i++) {
as6 = as4[i].split(/>.{0,}/i);
as7 = as6.join(“”);
as8 = as7.split(/”/i);
as9 = as8.join(“”);
as10 = as9.split(/target=_blank/i);
as11 = as10.join(“”);
as12 = as11.split(/mailto:/i);
as13 = as12.join(“”);
as14[i] = as13;
}
as5 = as14.join(“”);
}
Basically what I’m trying to do is to cut down all of the a tags in the fixmsg string, and only show the actual link, not including the <a href> stuff.
Any help would be greatly appreciated. ?
And… if there is any chance that anyone would know a regexp for getting rid of any HTML tags?