|
-
Oct 14th, 2005, 10:34 PM
#1
Thread Starter
PowerPoster
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.
-
Oct 17th, 2005, 06:57 PM
#2
Lively Member
Re: expressions
Could you post an example of these "outer html tags" ?
-
Oct 17th, 2005, 07:12 PM
#3
Thread Starter
PowerPoster
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!
-
Oct 17th, 2005, 09:34 PM
#4
Lively Member
Re: expressions
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|