| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> Pixelz: #822 (12681 clicks) Tcl: 0 <1> yes <2> it means (.+?) will transfer to variable with name 'var', right? <2> i will try now <1> well that part will match what's in between > and > <2> Pixelz, but why you use set var then? <2> third string of code <1> I don't know how to answer the question better then that without having to explain alot about regular expression <2> no no don't do it <2> i read docs about regexp
<1> ok <1> it's the same as awk <1> if you're familiar with that <2> nope <2> Is it right format? 'set MyVarname [regexp {>(.+?)>} $arg]' ? <2> looks that no <1> no <2> :-\ <1> regexp {>(.+?)>} $arg - MyVarname <2> it return 1 <1> yeah it will return 1 if it matches and 0 if it doesn't <2> works! :) <2> Pixelz, sorry, last problem: receive sctring from the end of string to the first symbol '>' from the end of string <2> Its from right to left <1> you mean "you DON'T want this part > you want this part", correct? <2> ) <2> :) yes <1> ;set arg {you DON'T want this part > you want this part} <0> Pixelz: #849 (151 clicks) Tcl: you DON'T want this part > you want this part <1> ;regexp {.*>(.+?)$} $arg - MyVarname <0> Pixelz: #850 (13616 clicks) Tcl: 1 <1> ;set MyVarname <0> Pixelz: #851 (138 clicks) Tcl: you want this part <2> wow <2> guru of regexp ;) <2> so easy... <1> it's easy once you know it <1> :) <2> And i make it with string commands, really too many commands will be <2> No, regexp is better <2> :) <1> my point exactly <1> using string commands is faster though so it might be better if speed is an issue <1> but usually it's not <2> ah. hm... <3> if {[regexp {>(.+?)>} $page - output]} is this right? <4> if -> http://www.tcl.tk/man/tcl8.4/TclCmd/if.htm
<3> variable output not found <5> ?? uno <5> lol <4> [What-is] That term has not been defined. <3> if {[regexp {>(.+?)>} $arg - output]} i mean <6> Pixelz or BL4DE you here? <7> i'm not here <6> you'll do <6> how can i get the first rel date from imdb? <6> http://www.imdb.com/title/tt0187738/releaseinfo (i.e. 21 March 2002) <7> you just need the date? <6> yeah <6> country would be nice too <7> ok, gimme a few <6> ok =) <7> set exp {<a\ href\=\"/Recent/.*?\">(.*)?</a></b></td>\n\ *<td\ align\=\"right\"><a\ href\=\"/BusinessThisDay\?day\=[0-9]*&month=.*?\">(.*)?</a>\ <a\ href\=\"/Sections/Years/[0-9]*/">(.*)?</a></td>} <0> chilla: #879 (185 clicks) Tcl: <a\ href\=\"/Recent/.*?\">(.*)?</a></b></td>\n\ *<td\ align\=\"right\"><a\ href\=\"/BusinessThisDay\?day\=[0-9]*&month=.*?\">(.*)?</a>\ <a\ href\=\"/Sections/Years/[0-9]*/">(.*)?</a></td> <7> that's your regular expression <6> thanks =) <7> and then... <7> need more help or that's it? <6> i'll be fine =) <6> thanks <7> if you do: set mylist [regexp -all -inline $exp $data] <7> where data contains the html source <7> you will have a list where ever 2nd, 3rd, 4th item is Country, Month Date, year <7> form a YYYYMMDD list from that and sort... <6> =) ok <3> regexp ?? <0> regexp -> http://Tcl.Tk/man/tcl8.5/TclCmd/regexp.htm <7> clock format [clock scan "25 March 2005"] -format "%Y%m%d" <0> chilla: #892 (341 clicks) Tcl: 20050325 <7> an easy way to do it, btw <6> ok =P <7> if you are still working on it... <7> >> foreach {blah country datemon year} $mylist {lappend newlist [list [clock format [clock scan "$datemon $year"] -format "%Y%m%d"] $country]} <7> umm, initilize newlist first <8> no <6> already done.. <7> ok <6> but thanks for the concern <7> the problem is when someone tells me about something they are doing, i can't just stop at hints... i have to do it myself too :P <6> lol
Return to
#eggtcl or Go to some related
logs:
#nhl #politics ERROR: modulus len 0x108 #computers #hardware eggdrop uptime tcl sysinfo.tcl troglidites #microsoft #beginner #windows
|
|