> I need a routine to remove all HTML tags from a string (string might be up > to a few paragraphs long and include line breaks etc.) > > Can't use Regular Expressions as only have ASP2.0 and can't use a > component on our platform. Isn't there anything as simple as: > > RemoveHTML(String1)
function stripHTML(strtext) stripHTML="" if len(strtext)=0 then Exit Function dim arysplit,i,j arysplit=split(strtext,"<") if len(arysplit(0))>0 then j=1 else j=0 for i=j to ubound(arysplit) if instr(arysplit(i),">") then arysplit(i)=mid(arysplit(i),instr(arysplit(i),">")+1) else arysplit(i)="<" & arysplit(i) end if next stripHTML=replace(replace(mid(join(arysplit),2-j),">",">"),"<","<" ) end function -- Lon Kraemer ----------------------------------------- --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
