ASP
Here you can find some FREE usefull Classic ASP / VBScript code snippets, class modules, etc.
Function RemoveTags(String)String
This function removes classic <> tags from a String. Usefull for removing HTML formating or XML tags a keep only the text.
Example
Note that everything within the <> Tags will be removed from the String. <% response.write RemoveTags("Hello <b>world</b>!<br><u>How are you?</u>") ' this will display the text without formatting and without the line-break %> Source Code <%
function RemoveTags(byval s) dim p1, p2 p1=instr(s,"<"):p2=instr(p1+1,s,">") do while p1>0 and p2>p1 s=left(s,p1-1) & mid(s,p2+1) p1=instr(s,"<"):p2=instr(p1+1,s,">") loop RemoveTags=s end function %> |