473,382 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

regex question.

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
ko**@brainsharp.net
Nov 18 '05 #1
2 1169
There's a guy doing something similar here, except he is getting the images
and URLs. Might be worth a look?

http://www.planet-source-code.com/vb...=339&lngWId=10
"Koen Hoorelbeke" <ko**@brainsharp.net> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
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
ko**@brainsharp.net


Nov 18 '05 #2
There's a guy doing something similar here, except he is getting the images
and URLs. Might be worth a look?

http://www.planet-source-code.com/vb...=339&lngWId=10
"Koen Hoorelbeke" <ko**@brainsharp.net> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
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
ko**@brainsharp.net


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: engwar1 | last post by:
Not sure where to ask this. Please suggest another newsgroup if this isn't the best place for this question. I'm new to both vb.net and regex. I need a regular expression that will validate what...
4
by: aevans1108 | last post by:
expanding this message to microsoft.public.dotnet.xml Greetings Please direct me to the right group if this is an inappropriate place to post this question. Thanks. I want to format a...
2
by: Tim Conner | last post by:
Hi, Thanks to Peter, Chris and Steven who answered my previous answer about regex to split a string. Actually, it was as easy as create a regex with the pattern "/*-+()," and most of my string...
6
by: Du Dang | last post by:
Text: ===================== <script1> ***stuff A </script1> ***more stuff <script2> ***stuff B
17
by: clintonG | last post by:
I'm using an .aspx tool I found at but as nice as the interface is I think I need to consider using others. Some can generate C# I understand. Your preferences please... <%= Clinton Gallagher ...
5
by: Chris | last post by:
How Do I use the following auto-generated code from The Regulator? '------------------------------------------------------------------------------ ' <autogenerated> ' This code was generated...
6
by: Martin Evans | last post by:
Sorry, yet another REGEX question. I've been struggling with trying to get a regular expression to do the following example in Python: Search and replace all instances of "sleeping" with "dead"....
7
by: Extremest | last post by:
I am using this regex. static Regex paranthesis = new Regex("(\\d*/\\d*)", RegexOptions.IgnoreCase); it should find everything between parenthesis that have some numbers onyl then a forward...
6
by: Phil Barber | last post by:
I am using Regex to validate a file name. I have everything I need except I would like the dot(.) in the filename only to appear once. My question is it possible to allow one instance of character...
6
by: | last post by:
Hi all, Sorry for the lengthy post but as I learned I should post concise-and-complete code. So the code belows shows that the execution of ValidateAddress consumes a lot of time. In the test...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.