Hi folks-
This is killing me:
I have to insert Argentina's stock quotes data into a table, and the only source I have available is a webpage at our local stock market that I can suck and deliver. (I know Reuters would be better, but this is the cheapest way)
The file looks like this:
(pls check http://www.merval.sba.com.ar/diferidos/mam/rmerval.htm)
...<body>
blahblahblah<PRE>
....
BT06C 100,581 12:00 101,10 <font color = #0000ff>+ 0,51 </font> 1 1.011.000 1.000.000 101,10
BT06D 101,10 11:16 <font color = #0000ff>+ 0,00 </font> 1 10.110 10.000 101,10
BT07 103,39 17:08 103,50 <font color = #0000ff>+ 0,29 </font> 10 316.647 305.217 103,745
BT07C 103,311 17:08 103,509 <font color = #0000ff>+ 0,51 </font> 12 34.435.920 33.200.000 103,723...</PRE>
I´ve managed to get all values separated just by one space replacing any combination of spaces by just one space.
But this will fail when some value is absent (like in the second line, there were no traded stocks for the day, so there isn't a max price).
And, as a bonus, the length of any value is variable (i.e. any volume can be traded for a particular day).
I think that if I can determine which is the right-est position a column may assume, substr() can be of help, but this would require a constant watching of the file format (or the column width).
Is there a way to automate this and get it into the (in)famous table?
Thanks in advance,
Andres