| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> ye <0> ;nick2hand CyBex_ <1> Gotisch: #131 (4287 clicks) Tcl: * <0> ;nick2hand Gotisch <1> Gotisch: #132 (340 clicks) Tcl: Gotisch <2> nick2hand yoe <1> yoe: #133 (321 clicks) Tcl: yoe <0> ;chattr <1> Gotisch: #134 (13615 clicks) Tcl error: invalid command name "chattr" <0> ;proc chattr args { if {[string equal "Gotisch" $args]} { return +abcdefghijklmnopqrstuvwxyz} else { return * } } <1> Gotisch: #135 (512 clicks) Tcl: <0> ;chattr Gotisch <1> Gotisch: #136 (2804 clicks) Tcl: +abcdefghijklmnopqrstuvwxyz <0> nice :) <3> +b, you are banned <3> +k kicked
<3> go out <3> +b bot i mean ;) <0> :] <4> ; set var "%hello" ; regexp {%{0}hello} $var <1> [piLL]: #144 (9129 clicks) Tcl: 1 <4> how do i make it so it would never match "%hello", but always match "hello"? <5> ; regexp {[^%]hello} $var <1> BL4DE: #146 (2959 clicks) Tcl: 0 <5> ; regexp {[^%]hello} "hello" <1> BL4DE: #147 (262 clicks) Tcl: 0 <5> ; regexp {[^%]*hello} "hello" <1> BL4DE: #148 (679 clicks) Tcl: 1 <5> ; regexp {[^%]*hello} "%hello" <1> BL4DE: #149 (275 clicks) Tcl: 1 <5> ; regexp {^[^%]*hello} "%hello" <1> BL4DE: #150 (587 clicks) Tcl: 0 <5> ; regexp {[^%]?hello} "%hello" <1> BL4DE: #151 (5626 clicks) Tcl: 1 <5> ; regexp {[^%]{1}hello} "%hello" <1> BL4DE: #152 (577 clicks) Tcl: 0 <5> ; regexp {[^%]{1}hello} "hello" <1> BL4DE: #153 (234 clicks) Tcl: 0 <5> ; regexp {[^%]{1}hello} "ahello" <1> BL4DE: #154 (250 clicks) Tcl: 1 <5> hope u can use something of that :> <4> ;regexp {[^[%]]hello} %hello <1> [piLL]: #156 (617 clicks) Tcl: 0 <4> ;regexp {[^[%]]hello} hello <1> [piLL]: #157 (247 clicks) Tcl: 0 <5> why the extra []' <4> *shrug* <4> ; regexp {[^%]{1}hello} "hello" <1> [piLL]: #160 (256 clicks) Tcl: 0 <4> hmm, i can see from your examples, which one does it? <4> *can't <5> problem is, it will expect something before hello <5> and not ^ <6> regexp {^%{0}hello} "hello" <1> Pixelz: #165 (536 clicks) Tcl: 1 <6> regexp {^%{0}hello} "%hello" <1> Pixelz: #166 (272 clicks) Tcl: 0 <5> that's forcing it to be in the beginning <6> yeah <6> could be something else though <6> like a whitespaec <6> whitespace* <6> regexp {\s%{0}hello} " %hello" <1> Pixelz: #172 (632 clicks) Tcl: 0 <6> regexp {\s%{0}hello} " hello" <1> Pixelz: #173 (263 clicks) Tcl: 1 <6> other then that I don't know <5> i would look for it in the word and use ! <5> in the if <5> word/line <6> hmm <4> well, it's for a regsub, to replace "cookies"... <4> or rather, not to replace them <6> regexp {(^|\s)%{0}hello} "hello" <1> Pixelz: #181 (1115 clicks) Tcl: 1 <6> regexp {(^|\s)%{0}hello} "%hello" <1> Pixelz: #182 (259 clicks) Tcl: 0
<6> regexp {(^|\s)%{0}hello} " hello" <1> Pixelz: #183 (1305 clicks) Tcl: 1 <6> regexp {(^|\s)%{0}hello} " %hello" <1> Pixelz: #184 (258 clicks) Tcl: 0 <4> but what if []{} or smth preceeded it :S <6> guess you could add a whole bunch of stuff but it's kinda ugly <6> has to be a better way to match that <6> try asking in #regexp <4> yeah, have been playing for the last hour, but no joy <4> k will do, ty <6> #regex even <4> i guess i could do a loop as you say BL4D3...like if {![regexp {%hello} $var] && [regexp {hello} $var]} {} kinda does the trick <4> s/loop/if <4> ho hum, ty both (BL4D3 & Pixelz) for your time <4> hmm, just thought of a completely barmy way of doing it, but would be easier doing the regsubs i want....could replace %hello with %tempcookie, process what i need, then replace %tempcookie back to %hello <6> I've got it <6> ;regexp {([^%]|^)hello} "foo%hellofoo" <1> Pixelz: #9 (3463 clicks) Tcl error: invalid command name "regexp" <6> uh <4> eh <6> ;regexp <1> Pixelz: #12 (433 clicks) Tcl error: invalid command name "regexp" <6> what the hell <4> o_O <4> FireEgl? <6> regexp <6> regexp x x <6> ;regexp x x <1> Pixelz: #18 (440 clicks) Tcl error: invalid command name "regexp" <6> well try it locally <6> it should work <6> [^%] can't match nothing <6> so if you just have "hello" <6> it won't match <7> sorry i broke the bot unintenionally :/ <4> yeah, i see...i tried with a () there, but obviously that actualy matched nothing <7> i hope FireEgl will be around to fix it soon <6> I would be interested to know why negative lookahead didn't work though <6> ie (?!%hello)hello <4> i got lost with that <4> i thought it was my bad interpretation of the man <6> appearently perl has something called lookbehing which seems very convenient <6> you should be able to do (?<=%)hello <6> and that'd be it <4> i'm just starting out with perl, hardly know it at all...like 1% <6> yeah me neither, I just read about lookbehind <4> = perl-noob :x <7> yes, lookbehind ***ertions are pretty important, maybe it gets implemented someday <4> so how *should* the negative lookahead work...it doesnt seem to work as explained the man... <6> is there any way to match "bar" anywhere but not "foobar"? <6> without lookbehind? <7> yes <7> err <7> no, not without <7> thats why there is lookbehind ;) <7> you could technically do it though <7> but it gets kinda ugly <6> yeah <6> you'd need a quadzillion bracket expressions <6> or something <7> and branches <6> like [^f][^o][^o] <6> :D <7> thats not enough <7> it filters too much <7> ([^f]oo|f[^o]o|fo[^o]) <7> something along the lines of that <6> hmm I guess <7> but it uses up chars <6> yeah <6> that's the problem we had with %hello <0> \o/ <0> put your hands in the air! <0> matching bar but not foobar is like supereasy?
Return to
#tcl or Go to some related
logs:
#nhl #linuxhelp #nhl asus motherboard bring up bios press keys
#beginner the truth about msitf.pk #nintendo #solaris glftpd bonding povertyneck+steelers+mp3
|
|