egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Website splitting...

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Access
Voice


Joined: 04 Jun 2006
Posts: 22

PostPosted: Sun Jun 04, 2006 6:48 am    Post subject: Website splitting... Reply with quote

Ok i have a variable with the sourcecode of a html-page. Now i want to filter out some data...
the variable with the source: $source

in the source is some text like <blablabla>14:55<blublublub>
so, now i want to filter out 14:55 and "put" (sorry for bad english) it into an array, $time(1), if <blablabla>14:55<blublublub> is not just once in the source, i want to filter out all times -> $time(1), $time(2)....

Thanks for help!
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Jun 04, 2006 11:35 am    Post subject: Reply with quote

Code:
set list [regexp -all -inline {<blablabla>(\d{1,2}:\d{2})<blublublub>} $text]
set i 0
foreach {line in} $list {
   incr i
   set time($i) $in
}

_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber