I have a text file that is generated every few weeks that looks something like this:
Pick 1 - <A href="../teams/team_45.html">Guelph Royals</A>: SP <A href="../players/player_6153.html">Curt Amador</A> </TD></TR> Pick 2 - <A href="../teams/team_34.html">Hillsborough Highlanders</A>: 3B <A href="../players/player_8813.html">Zach Watson</A> </TD></TR> Pick 3 - <A href="../teams/team_40.html">Brooklyn Hoodrats</A>: SP <A href="../players/player_4162.html">Jerry Davis</A> </TD></TR> Pick 4 - <A href="../teams/team_47.html">Toronto Titans</A>: SP <A href="../players/player_9776.html">Toby Walker</A> </TD></TR>
(and so on through about 50 lines)
I want to run the data through a script that extracts only parts of each line. I need:
1) the Pick # (everything before the "-"
2) the player's position number (the two characters before the second "<A href=" I.E. "SP" or "3B")
3) the 4 digit player number (the 4 digits after "/players/player_"
4) the player's name (everything between ".html">" and "</A> </TD></TR>"
I'm not nearly as up on my text manipulation as I should be, and I know stripping out text that has quotes is going to mess me up. Would someone be able to show me a way to do this and perhaps even explain their code?
Thank you in advance.