| |
| |
| |
|
Comments:
<0> im bored <0> ; puts a <1> Gotisch: #232 (stdout) a <0> ;randsay <1> Gotisch: #233 (2244 clicks) Tcl error: invalid command name "randsay"
<0> ;proc randsay {} { puts " [lindex "A B C D E F G H I J K L M N O P" [expr {int(rand()*16)}]] is [lindex "A B C D E F G H I J K L M N O P" [expr {int(rand()*16)}]] " } <0> ;randsay <1> Gotisch: #234 (643 clicks) Tcl: <1> Gotisch: #235 (stdout) H is H <0> ;randsay <1> Gotisch: #236 (stdout) N is F <2> can I make regexp match ungreedily? <2> I have a string with a number of <a href>'s and I want to get the x that's inside the first <a ..>x</a> pair <3> yes, use an non-greedy quantifier <3> re_syntax ? <4> re_syntax -> http://www.tcl.tk/man/tcl8.4/TclCmd/re_syntax.htm <1> re_syntax -> http://Tcl.Tk/man/tcl8.5/TclCmd/re_syntax.htm <2> heidel: .*? and the like, eh? I'm not getting it to work. very odd. <3> yes <2> I did it like so: http://fakedew.net/code/tcl.regexp.txt <2> any thoughts on that?
<3> frankly, this looks like a bug or a shortcoming in tcls ARE engine, i'm not really sure <3> make that non-greedy [^\">]* into [^\">]*? and then the later non-greedy quantifier will work as well <3> erm, the greedy [^\">]* into non-greedy [^\">]*? <2> thanks!, that works like a charm <0> ; regexp -inline -all {".*?[^\\]"|[^" ].*?} {"this is a\" test" test another_test "this is a test" this are tests too} <1> Gotisch: #386 (37851 clicks) Tcl: {"this is a\" test" test another_test "this is a test"} {this are tests too} <0> ; regexp -inline -all {".*?[^\\]"} {"this is a\" test" test another_test "this is a test" this are tests too} <1> Gotisch: #387 (13191 clicks) Tcl: {"this is a\" test"} {"this is a test"} <0> ; regexp -inline -all {\w+?|".*?[^\\]"} {"this is a\" test" test another_test "this is a test" this are tests too} <1> Gotisch: #388 (24239 clicks) Tcl: {"this is a\" test" test another_test "this is a test"} this are tests too <0> ; regexp -inline -all {this|".*?[^\\]"} {"this is a\" test" test another_test "this is a test" this are tests too} <1> Gotisch: #389 (783 clicks) Tcl: {"this is a\" test" test another_test "this is a test"} this <0> ah <0> ; regexp -inline -all {".*?[^\\]"} {"this is a\" test" test another_test "this is a test" ""} <1> Gotisch: #391 (280 clicks) Tcl: {"this is a\" test"} {"this is a test"} <0> ; regexp -inline -all {".*?[^\\]*"} {"this is a\" test" test another_test "this is a test" ""} <1> Gotisch: #392 (872 clicks) Tcl: {"this is a\"} {" test another_test "} {" "}
Return to
#tcl or Go to some related
logs:
#politics marriage isolationsim
suse 10 smb umount brazilain rainforest macking toch #beginner #politics YOU WILL JUST COME BACK RUNNING bigest-pussies #beginner
|
|