|
 |
aspx_beginners thread: Regex Pattern to find HTML CODE
Message #1 by "Shay E. Phillips" <sphillips@m...> on Thu, 1 Aug 2002 16:49:12
|
|
Hello all,
I am new to regular expressions and I was trying to figure out how to get
some HTML code from a webpage using Regex() in C#. I need to extract the
code from between two tags:
... HTML CODE 1...
<!-- End wordtop.htm -->
... HTML CODE 2...
<!-- Begin wordbot.htm -->
... HTML CODE 3...
I want to retrieve HTML CODE 2. I tried using the pattern [<!-- End
wordtop.htm -->].*?([0-9]+.?[0-9]*)[<!-- Begin wordbot.htm -->] but it
isn't working. Where am I going wrong? Any help would be greeatly
appreciated.
Shay Phillips
Palomar College
Message #2 by "Joey Brenn" <jbrenn@f...> on Thu, 1 Aug 2002 12:14:25 -0500
|
|
The Wrox book 'Text Manipulation' has some code to do just this but it
is in VB.Net. Might help.
Joey
-----Original Message-----
From: Shay E. Phillips [mailto:sphillips@m...]
Sent: Thursday, August 01, 2002 11:49 AM
To: aspx_beginners
Subject: [aspx_beginners] Regex Pattern to find HTML CODE
Hello all,
I am new to regular expressions and I was trying to figure out how to
get
some HTML code from a webpage using Regex() in C#. I need to extract the
code from between two tags:
... HTML CODE 1...
<!-- End wordtop.htm -->=09
... HTML CODE 2...
<!-- Begin wordbot.htm -->
... HTML CODE 3...
I want to retrieve HTML CODE 2. I tried using the pattern [<!-- End
wordtop.htm -->].*?([0-9]+.?[0-9]*)[<!-- Begin wordbot.htm -->] but it
isn't working. Where am I going wrong? Any help would be greeatly
appreciated.
Shay Phillips
Palomar College
|
|
 |