This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

only get data from "today" til "yesterday&quo

Old posts that have not been replied to for several years.
Locked
J
Jagg
Halfop
Posts: 53
Joined: Sat Jan 24, 2004 11:32 am

only get data from "today" til "yesterday&quo

Post by Jagg »

Hi,

I will get only the code from the date "today" (should be displayed) til "yesterday" (shouldn't be displayed)

This is the source code (all in ONE line):
.....muchHTMLcodeBefore<TD align=center WIDTH="16.6666666666667%" ALIGN="RIGHT" class=bcMTitle> Change </TD></TR><TR><TD ALIGN="RIGHT" class=bcText> 01/27/04</TD><TD ALIGN="RIGHT" class=bcText> 1154.25</TD><TD ALIGN="RIGHT" class=bcText> 1154.75</TD><TD ALIGN="RIGHT" class=bcText> 1151.00</TD><TD ALIGN="RIGHT" class=bcText> 1151.50</TD><TD ALIGN="RIGHT" class=bcTextRed> -2.75</TD></TR></TABLE><TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=1><TR><TD WIDTH="16.6666666666667%" ALIGN="RIGHT" class=bcText>01/26/04</TD><TD WIDTH="16.6666666666667%" ALIGN="RIGHT" class=bcText>1140.00</TD><TD ...and so on (all in one line)
I can regexp the html code with:
[regsub -all {<[^>]*>} $line {} line]
But how can I get only the blue colored one (just from the date today til yesterday).
(Date is changing daily of course 8))

Thanks!
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Code: Select all

set A [clock format [clock sec] -format %D]
set B [clock format [clock scan "yesterday"] -format %D]
regexp $A.*?$B $html AtoB
Have you ever read "The Manual"?
Locked