| |
| |
| |
|
Page: 1 2 3 4
Comments:
<0> i'm doing part c now =) <1> omg <1> too much for me <1> :] <1> ill try it tomorrow <0> lol <0> still here __Gotisch <1> ye <2> grimmy ;p <1> [GRiMMY] yes <1> [GRiMMY] <3> __Gotisch: #4772 (stdout) [GRiMMY] [GRiMMY] [GRiMMY] <1> why did he highlight me and then leave? <0> sorry <0> i was gonna say i had part c to work <0> but i didnt
<1> oh hehe <4> is there anything wrong with my regxp? : <td cl***=\"col1\">([\w]+)</td>\s\w\s*<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5> <4> between <td cl***=\"col1\"> and </td>\s\w\s*<h4> there can be anything... <4> wrong or bad? <5> if there can be anything then you have to put .* :) <5> unless you don't mean that anything as literally <5> you might want to go for [^<]+ <4> http://www.rafb.net/paste/results/qfSA1h69.html <4> puts [regexp -all -inline -- {<td cl***=\"col1\">([\w]+)</td>.*<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5>} $hdata] <4> on first match id like to get 1, Corinne Bailey Rae, Corinne Bailey Rae on second match 2, Jack Johnson, In Between Dreams <5> I don't think \w matches 1 <4> ill try \d <5> ; regexp -inline {\w} 1 <3> Obeliks: #4790 (48418 clicks) Tcl: 1 <4> umm not <5> ; regexp -inline {\w} $ <3> Obeliks: #4792 (195 clicks) Tcl: <5> ok so it does match :D <5> ah <5> you're gonna need dotall <4> ?? <5> hmm <5> seems tcl does that by default <4> puts [regexp -all -inline -- {<!-- Start Entry data -->.*<td cl***=\"col1\">([\w]+)</td>.*<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5>} $hdata] <4> that does not work correctly <4> but : puts [regexp -all -inline -- {</td>.*<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5>} $hdata] that does works <5> it does? <4> thing is i need <td cl***="col1">1</td> too :( <5> maybe get rid of the \" escapes <4> umm not working <4> i get results but bad ones <5> hmm <5> you might want to change [\w]+ to \w+ <5> ; regexp {[\w]} a <3> Obeliks: #4808 (19516 clicks) Tcl: 1 <5> hmm <4> heh <5> seems it doesn't matter though <4> regxp is damn hard :P <4> i am on same regxp since days heeh <5> well for starters: <5> \s\w\s <5> \s\w\s* <5> you know what that means? <5> means <oneSpace><oneLetter><zeroOrMoreSpaces> <5> I think you meant something quite different <4> yes <4> .* means "anything" right? <5> . is any character unless -linestop is specified <5> and * means 0 or more <4> ok <5> you could try expanded <5> though I never worked with that <5> so have you tried <td cl***=\"col1\">([\w]+)</td>.*<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5> ? <5> or only with the comment before it <5> because you might have to escape the exclamation mark <4> yup i did <5> can't help you then <5> debug it step by step <5> and see where it fails <4> np mate
<4> i think i know why <4> nah dosent works :( <6> regexp -all -inline -- {<!--\s+Start\s+Entry\s+data\s+-->.*<td\s+cl***=\"col1\">([\w]+)</td>.*<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5>} $hdata <6> is it \s+ for space? i cant remember, <6> or use .* <4> dosent work <4> http://www.bbc.co.uk/radio1/chart/albums.shtml <4> all i want is to get each rank + artist + album name <6> regsub -all -- {<.?>+} $html {} <6> ;] <6> then just split each line <6> alot easier <4> lol <6> ;regsub -all -- {<.?>+} "<tr><td cl***="col1">1</td><td cl***="col2">NEW<br /><img src="/radio1/chart/media/chart_star.gif" width="17" height="17" alt="New Entry" border="0" /></td><td cl***="col3">(-)</td><td cl***="col4"><h4>Corinne Bailey Rae</h4><h5>Corinne Bailey Rae</h5><p>(EMI)</td></tr>" {} html <6> set html <3> badaas: #4851 (225 clicks) Tcl error: extra characters after close-quote <6> oh piss off <6> ;regsub -all -- {<.?>+} {<tr><td cl***="col1">1</td><td cl***="col2">NEW<br /><img src="/radio1/chart/media/chart_star.gif" width="17" height="17" alt="New Entry" border="0" /></td><td cl***="col3">(-)</td><td cl***="col4"><h4>Corinne Bailey Rae</h4><h5>Corinne Bailey Rae</h5><p>(EMI)</td></tr>} {} html <3> badaas: #4854 (582 clicks) Tcl: 1 <6> ;set html <3> badaas: #4855 (136 clicks) Tcl: <tr><td cl***="col1">1</td><td cl***="col2">NEW<br /><img src="/radio1/chart/media/chart_star.gif" width="17" height="17" alt="New Entry" border="0" /></td><td cl***="col3">(-)</td><td cl***="col4"><h4>Corinne Bailey Rae</h4><h5>Corinne Bailey Rae</h5>(EMI)</td></tr> <6> well, etc. lol <6> too l8 <4> set results "[regexp -all -inline -- {<td cl***=\"col1\">([\w\s]+)</td>.{10,250}<h4>([\w\s]+)</h4>\s*<h5>([\w\s]+)</h5>} $hdata]" <4> why wont this work? only stdout? <7> set file "**** u" <3> N86ers: #4911 (146 clicks) Tcl: **** u <7> ;regexp {u} {me} $file <3> N86ers: #4912 (382 clicks) Tcl: 0 <7> ;regexp {u} $file {me} <3> N86ers: #4913 (231 clicks) Tcl: 1 <7> ;regexp $file {u} {me} <3> N86ers: #4914 (459 clicks) Tcl: 0 <7> ;regexp <3> N86ers: #4915 (273 clicks) Tcl error: wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?" <4> ([\w\s]+) <4> if i have for exemple a "*" <4> it wont match right? <8> correct <4> is it possible to do something like: <4> set regexp_albums "<td cl***=\"col1\">(\[\w\s\]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5>" <3> Klipsch: #4933 (169 clicks) Tcl: <td cl***="col1">([ws]+)</td>.{20,250}<h4>(.{1,100})</h4>s*<h5>(.{1,100})</h5> <4> set results [regexp -all -inline -- {$regexp_albums} $html] <9> set regexp_albums {<td cl***=\"col1\">(\[\w\s\]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5>} <3> th3dge: #4935 (156 clicks) Tcl: <td cl***=\"col1\">(\[\w\s\]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5> <9> set results [regexp -all -inline -- $regexp_albums $html] <9> that should work <9> unescape <9> set regexp_albums {<td cl***="col1">(\[\w\s\]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5>} <3> th3dge: #4939 (188 clicks) Tcl: <td cl***="col1">(\[\w\s\]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5> <4> kk <4> umm <4> the set part is causing problems <4> \[ <9> set regexp_albums {<td cl***="col1">([\w\s]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5>} <3> th3dge: #4944 (154 clicks) Tcl: <td cl***="col1">([\w\s]+)</td>.{20,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5> <4> yep <4> thanks a lot mate <9> no worries <4> the biggest regexp takes 5.5 sec to process <4> heh <4> slow <9> geez, how big is that? <4> set regexp_singles {<td cl***=\"col1\">([\w\s]+)</td>\s*<td cl***=\"col2\">.{5,250}</td>.{5,100}<td cl***=\"col4\">.{1,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5>} <3> Klipsch: #4952 (167 clicks) Tcl: <td cl***=\"col1\">([\w\s]+)</td>\s*<td cl***=\"col2\">.{5,250}</td>.{5,100}<td cl***=\"col4\">.{1,250}<h4>(.{1,100})</h4>\s*<h5>(.{1,100})</h5> <9> oh, you probably have alot of albums <9> :) <4> 40 <9> ah <9> thats kinda slow yeah <4> singles takes 5.5 sec to do <9> try to make it smaller <4> not sure i can
Return to
#tcl or Go to some related
logs:
#gamedev ruby image pil filtercheck #sql charity doesn't work #politics #politics #beginner #politics #beginner
|
|