|
 |
aspx thread: Parsing a file using regular expressions
Message #1 by "sstewart" <sstewart_59102@y...> on Thu, 7 Mar 2002 17:34:42
|
|
Hello,
I'm trying to create a web page that parses another web page using regular
expressions. I want to retrieve all values between the <font> and </font>
tags and store this information in a database.
My regular expression will look something like this. Please correct me if
this is wrong:
'/^(<FONT color=#b75b00 size=3>)(/.)+(</FONT>)/$'
Basically, I want to store the second grouping, (/.)+, in the database.
Do I use the Matches() method of the regular expressions object, or maybe
the split() method? Or is there a better way of doing this?
Any help would be appreciated.
sstewart
Message #2 by "sstewart" <sstewart_59102@y...> on Thu, 7 Mar 2002 17:54:18
|
|
Another note. I don't know if this was clear or not. I want to store the
second grouping in an array, and then iterate through the array storing
each value in the database. So my question is what method do I use to
store those values in an array?
Hope this makes it clearer.
sstewart
> Hello,
>
> I'm trying to create a web page that parses another web page using
regular
> expressions. I want to retrieve all values between the <font> and
</font>
> tags and store this information in a database.
>
> My regular expression will look something like this. Please correct me
if
> this is wrong:
>
> '/^(<FONT color=#b75b00 size=3>)(/.)+(</FONT>)/$'
>
> Basically, I want to store the second grouping, (/.)+, in the database.
> Do I use the Matches() method of the regular expressions object, or
maybe
> the split() method? Or is there a better way of doing this?
>
> Any help would be appreciated.
>
> sstewart
|
|
 |