| View previous topic :: View next topic |
| Author |
Message |
Access Voice
Joined: 04 Jun 2006 Posts: 22
|
Posted: Sun Jun 04, 2006 6:48 am Post subject: Website splitting... |
|
|
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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Jun 04, 2006 11:35 am Post subject: |
|
|
| 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 |
|
 |
|
|
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
|
|