Jag har sökt endel på regular expressions och testat endel men jag får det inte att fungera...
Jag hade tänkt göra ett script som extraherar information från min skolas online schema. Jag har lyckats med att extrahera ut följande:
<form>
<TD VALIGN="TOP" ALIGN="LEFT" class="brodtext">2003-04-07_ Mån_</TD>
<TD VALIGN="TOP" class="brodtext">10:00-11:45_</TD>
<TD VALIGN="TOP" class="brodtext">Dm2 _</TD>
<TD VALIGN="TOP" class="brodtext">IndEkEnt_</TD>
<TD VALIGN="TOP" class="brodtext">_</TD>
<TD VALIGN="TOP" class="brodtext">B102 JP-Aulan
_</TD>
<TD VALIGN="TOP" class="brodtext">WeBj_</TD>
<TD VALIGN="TOP" class="brodtext">Föreläsning
_</TD>
<TD VALIGN="TOP" class="brodtext"> _
</TD>
</form>
</TR>
<TR>
<form>
<TD VALIGN="TOP" ALIGN="LEFT" class="brodtext">[2003-04-09]_[Ons]_</TD>
<TD VALIGN="TOP" class="brodtext">[08:00-11:45]_</TD>
<TD VALIGN="TOP" class="brodtext">[Dm2] _</TD>
<TD VALIGN="TOP" class="brodtext">[Systutv] _</TD>
<TD VALIGN="TOP" class="brodtext">[B]_</TD>
<TD VALIGN="TOP" class="brodtext">[E167]
_[/blue]</TD>
<TD VALIGN="TOP" class="brodtext">[StAr]_</TD>
<TD VALIGN="TOP" class="brodtext">[Föreläsning]
_</TD>
<TD VALIGN="TOP" class="brodtext">[Labb]_
</TD>
</form>
...n
...n = betyder att det finns fler sådana poster
Jag vill kunna extrahera ut:
Dag, Tid, Prog, Kurs, Grp, Sal, Sign, Moment och Typ
Jag har märkt ut de poster som jag vill kunna extrahera med []
Det finns ungefär 25 poster på hela sidan nu men det kan variera, jag vill alltså kunna hämta ut informationen från alla 25 posterna. Hoppas att jag varit tydlig...
Hur ska jag utforma uttrycket för att göra det möjligt?
Tack på förhand, vad hade man gjort utan wF? ;)