Quantcast
Viewing all articles
Browse latest Browse all 27044

VS 2010 Grab some text from HTML source,

I need some advice on what to do.

I'm making a program to do some math with hours worked and need to extract the hours worked from the website but the way I'm doing it is really sloppy and buggy.

What would be the best way to extract multiple strings from this web source.

PHP Code:

            <tbody>
                <
tr>
                    <
td><a href="time.pl?frmTarget=DETAIL&amp;date=2013-05-12&amp;employee_ident=713853" >2013-05-12 <span>Sunday</span></a></td>
                    <
td>00:00 06:30<br/>20:00 24:00</td>
                    <
td>10:30</td>
                    <
td class="zero">00:00</td>
                    <
td>10:30</td>
                    <
td>09:49</td>
                    <
td class="zero">00:00</td>
                    <
td class="zero">00:00</td>
                    <
td>00:02</td>
                    <
td class="zero">00:00</td>
                    <
td>00:02</td>
                    <
td>09:51</td>
                </
tr>
                <
tr>
                    <
td><a href="time.pl?frmTarget=DETAIL&amp;date=2013-05-13&amp;employee_ident=713853" >2013-05-13 <span>Monday</span></a></td>
                    <
td>00:00 06:30<br/>20:00 24:00</td>
                    <
td>10:30</td>
                    <
td class="zero">00:00</td>
                    <
td>10:30</td>
                    <
td>10:18</td>
                    <
td class="zero">00:00</td>
                    <
td class="zero">00:00</td>
                    <
td>00:12</td>
                    <
td class="zero">00:00</td>
                    <
td>00:12</td>
                    <
td>10:30</td>
                </
tr>
                <
tr>
                    <
td><a href="time.pl?frmTarget=DETAIL&amp;date=2013-05-14&amp;employee_ident=713853" >2013-05-14 <span>Tuesday</span></a></td>
                    <
td>00:00 06:30<br/>20:00 24:00</td>
                    <
td>10:30</td>
                    <
td class="zero">00:00</td>
                    <
td>10:30</td>
                    <
td>09:47</td>
                    <
td class="zero">00:00</td>
                    <
td class="zero">00:00</td>
                    <
td>00:04</td>
                    <
td class="zero">00:00</td>
                    <
td>00:04</td>
                    <
td>09:51</td>
                </
tr>
                <
tr

I need the last one for each class.

So I would want this to be extracted "09:51" + "10:30" + "09:51"

I have over 150 of these that need to be extracted and was wondering what would be the best way to accomplish this task?

Right now I'm finding the string "<td><a href="time.pl" then counting 11 lines down from it and then I extract the string. But this is doesn't work with some of them and is sloppy.

I tried a function that finds a string within sertin strings but it doesn't return the correct string because of multiple strings that match.

Viewing all articles
Browse latest Browse all 27044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>