Ok all that seemed easy now I'm pulling my hair out trying to implement the second part of my little project. This first one just told me about my own personal status. But now I would like to have Vox TTS the status of the rest of the employees on the spareboard. Im trying to use regex to get the data but its driving me nuts. Im not sure if there is a better way to implement this.
This is the HTML from the page Im using.
<TD>Spare Board : BRAKEMAN SPAREBOARD</TD></TR>
<TR align=center>
<TD>Sub District : WINNIPEG</TD></TR>
<TR align=center>
<TD>Yard Tag Location Indicator : </TD></TR></TBODY></TABLE></DIV>
<DIV>
<TABLE id=gvDetail0 style="FONT-SIZE: 10pt; BORDER-TOP: lightgrey 2px solid; FONT-FAMILY: Arial; BORDER-RIGHT: lightgrey 2px solid; BORDER-BOTTOM: lightgrey 2px solid; FONT-WEIGHT: normal; BORDER-LEFT: lightgrey 2px solid" borderColor=lightgrey cellSpacing=2 cellPadding=2 rules=all align=center border=2>
<TBODY>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-IMAGE: url(../media/beige.jpg?F5CH=I)" align=center>
<TH scope=col>Employee</TH>
<TH scope=col>Position</TH>
<TH scope=col>Rest<BR>yy-mm-dd/hh:mm</TH>
<TH scope=col>USHR<BR>hh:mm</TH>
<TH scope=col>MTOD<BR>hh:mm</TH>
<TH scope=col>Road / Yard</TH>
<TH scope=col>Yard Starts</TH></TR>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: lightgrey" align=center>
<TD>ANDERCHEK, M.(MIKE) PC ESB</TD>
<TD>01</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD></TR>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: whitesmoke" align=center>
<TD>PAGE, S. (STEPHEN) PC</TD>
<TD>02</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD></TR>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: lightgrey" align=center>
<TD>MCWILLIAMS, S. SHAUN CR PC</TD>
<TD>03</TD>
<TD>14-03-29/06:00</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD></TR>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: whitesmoke" align=center>
<TD>BEITZ, T. (TOM) PC CRO</TD>
<TD>04</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD></TR>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: lightgrey" align=center>
<TD>ESSLINGER, C. (CHRIS) PC</TD>
<TD>05</TD>
<TD>14-03-29/16:22</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD></TR>
<TR align=center>
<TD style="BACKGROUND-IMAGE: url(../media/beige.jpg?F5CH=I)" colSpan=7> </TD></TR>
<TR style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; COLOR: red" align=left>
<TD style="BACKGROUND-IMAGE: url(../media/beige.jpg?F5CH=I)" colSpan=7>Data current as of 3/28/2014 6:54:31 PM Mar. 28, 2014 06:54 (GMT-4)</TD></TR></TBODY></TABLE></DIV></DIV><!-- End code changes --><BR><!-- End code changes --></FORM></TD></TR>
<TR>
<TD>
<HR>
</TD></TR>
<TR>
<TD align=center>
<TABLE width="100%">
<TBODY>
<TR>
<TD width="50%" align=right><!--<a href="javascript:history.back()">Back</a> --><INPUT onclick=history.back() id=back type=button value=Back name=back> </TD>
<TD width="50%" align=left><!--<a href="javascript:logOff()">Log Off</a>--><INPUT onclick=javascript:logOff() id=logoff type=button value="Log Off" name=logoff> </TD></TR></TBODY></TABLE>
<TABLE width="100%">
<TBODY>
<TR>
<TD align=center><FONT size=1>For assistance, contact the USC: 1-800-387-1833. </FONT></TD></TR>
<TR>
<TD align=center><FONT size=2><I>Version 2.0 February 2008 </I></FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
Here are a few regex codes that I have used but I just can't seem to get the right
This is is basically giving me all the information I need but I'm trying to get rid of the stuff after the names eg."PC, ESB, CR, CRO"
<TD>(\w.*?)<
This one does remove the lines with "PC" but it also removes the name.
<TD>(\w.*?)(?<!PC)<
My goal is basically to have vox TTS "First Out, Name, if on rest?what time?, Second Out, Name.." and down the list.
Maybe I am in over my head lol.
Any help greatly appreciated guys! Cheers!