regex question.

K

Koen Hoorelbeke

Hi there,

Don't know if this is the right newsgroup, but I'll post it here anyway:

Have to find a good regex-code. Now I know there are plenty of sites with
regex-libraries, but can't seem to find the right one.

The problem: I have a page with html-data (formatted table), and I need the
data out of it, so I can insert it into a database. Below is an example of
one row of that table. Reading the page is no problem, inserting it into the
database is no problem either. Extracting the data from the html is the
problem.

I know I can do this using a regex-search. This search returns me a
match-collection, which I can cycle through and do all the necessary
inserts. However, I don't seem to find the right regex-expression.

Here's the html-code:

<tr>
<td CLASS="" width=4%><font size="2" face="Times New Roman, Times,
serif" color="#000000">1</font></td>
<td CLASS="" width=20%><a href="JavaScript:view_fiche('393')"><font
color=970018 size="2" face="Times New Roman, Times, serif">BILLAUT
Julien</font></a></td>
<td CLASS="" width=36%><font size="2" face="Times New Roman, Times,
serif" color="#000000">KAYAK CLUB LE PRADET</font></td>
<td CLASS="" align=center width=10%><font size="2" face="Times New
Roman, Times, serif" color="#000000">3</font></td>
<td CLASS="" align=center width=6%><font size="2" face="Times New Roman,
Times, serif" color="#000000">9</font></td>
<td CLASS="" align=center width=7%><font size="2" face="Times New Roman,
Times, serif" color="#000000">&nbsp;S&nbsp;(1981)&nbsp;</td>
<td CLASS="" align=center width=7%><font size="2" face="Times New Roman,
Times, serif" color="#000000">&nbsp;&nbsp;N1</td>
</tr>

And out of this html I need in this case (for this one row) the following
data:

1
Billaut Julien
Kayak Club Le Pradet
3
9
S (1981)
N1

Any help, comments, advise would be greatly appreciated !!!

Thanks in advance.

Greetingz,
Koen Hoorelbeke
(e-mail address removed)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,117
Latest member
Matilda564
Top