Thanks Nick. One question........

Does this work is a "<" or ">" is part of the string such as:

<p><b><font face="arial">The number 3 is > number 2.</b></p>



Quoting Nick Middleweek <[EMAIL PROTECTED]>:

> Well, forgot my advice, looks like Lon has a better idea! You know I keep
> forgetting the power of split and join.
> 
> Cheers,
> Nick
> 
> 
> :> -----Original Message-----
> :> 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),">","&gt;"),"<","&lt;"
> :> )
> :> end function
> 
> 
> ---
> You are currently subscribed to activeserverpages as:
> [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> %%email.unsub%%
> 





---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to