Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Is there an ASP command to auto strip all HTML tags out of a string?

Reply
Thread Tools

Is there an ASP command to auto strip all HTML tags out of a string?

 
 
Laphan
Guest
Posts: n/a
 
      06-18-2006
If not, any ideas on how to do this?

I just want the raw text of a string so I can display a preview of what is
in the file.

Thanks

Laphan


 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      06-18-2006

"Laphan" <> wrote in message
news:...
> If not, any ideas on how to do this?
>
> I just want the raw text of a string so I can display a preview of what is
> in the file.
>
> Thanks
>
> Laphan
>


A RegExp ought to conver it:-

Dim rgx
Set rgx = New RegExp

rgx.Pattern = "\<.*?\>"
rgx.Global = True


sText = rgx.Replace(sHTML, "")



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
strip all but second second line from bottom and then strip that!!!! yelipolok Perl Misc 4 01-27-2010 08:14 AM
Regex to strip evil HTML tags Daniel M. Hendricks ASP .Net 2 04-11-2005 02:21 AM
strip and its evil brother strip! Aquila Ruby 35 03-31-2005 04:10 AM
Strip HTML tags? Fazer Python 8 12-16-2003 03:49 AM
Re: Strip HTML tags? EP Python 0 12-14-2003 04:57 AM



Advertisments