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

Discussion in 'ASP General' started by Laphan, Jun 18, 2006.

  1. Laphan

    Laphan Guest

    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
    Laphan, Jun 18, 2006
    #1
    1. Advertising

  2. "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, "")
    Anthony Jones, Jun 18, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel M. Hendricks

    Regex to strip evil HTML tags

    Daniel M. Hendricks, Apr 10, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,011
    vMike
    Apr 11, 2005
  2. Fazer

    Strip HTML tags?

    Fazer, Dec 14, 2003, in forum: Python
    Replies:
    8
    Views:
    929
    Fazer
    Dec 16, 2003
  3. linkswanted
    Replies:
    1
    Views:
    887
  4. Aquila
    Replies:
    35
    Views:
    441
    Mathieu Bouchard
    Mar 31, 2005
  5. yelipolok
    Replies:
    4
    Views:
    245
    John W. Krahn
    Jan 27, 2010
Loading...

Share This Page