Results 1 to 4 of 4

Thread: expressions

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    expressions

    well i thought I had this all done and dusted but there is always one problem!

    I am reading an entire webpage into a string, so i can do stuff with it.

    now obviously the page will show all standard html tags. however in this webpage it has other html tags, which are shown in example type forms (like what you see on htmlgoodies.com)

    is there a way i can strip out the "outer" html tags? I have a regex expression which strips out ALL tags but i just want to strip out the outer tags if possible so i can perform operations on the main inner page.

    not only this, i wish to perform some search on html tags entered as a search string - when doing this using regex.match, it finds it once but after that it doesnt! I am using a loop to go through to make regex keep doing the matches but it only finds the 1 tag in the string.

    any ideas?
    Last edited by Techno; Oct 14th, 2005 at 10:51 PM.

  2. #2
    Lively Member deranged's Avatar
    Join Date
    Jun 2004
    Location
    TN
    Posts
    104

    Re: expressions

    Could you post an example of these "outer html tags" ?

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: expressions

    actually its ok now, i finished it, not including the outer tags but would be nice to make it nicer!

    "outer" HTML tags are just ordinary HTML tags <html><head><body> etc....

    I just want to be able to remove these tags:

    <html>
    <head>
    <title>
    <body>

    but having typed this just now, I think i can just replace them with String.Empty!

  4. #4
    Lively Member deranged's Avatar
    Join Date
    Jun 2004
    Location
    TN
    Posts
    104

    Re: expressions

    Quote Originally Posted by Techno
    actually its ok now, i finished it, not including the outer tags but would be nice to make it nicer!

    "outer" HTML tags are just ordinary HTML tags <html><head><body> etc....

    I just want to be able to remove these tags:

    <html>
    <head>
    <title>
    <body>

    but having typed this just now, I think i can just replace them with String.Empty!
    Yep. That should do it. Glad you got it fixed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width