@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> regexp -- {-{1,2}([A-Za-z]+)(?: |=)(?:"*(.*?)"*|([^ ]+))} {-foo "bar"} match cmd value ; puts "cmd=$cmd,value=$value"
<1> row_: #1495 (stdout) cmd=foo,value=bar
<0> thanks
<2> regexp -all -inline -- {-{1,2}([A-Za-z]+)(?: |=)(?:"(.*?)"|([^ ]+))} {-foo bar} match
<2> ;regexp -all -inline -- {-{1,2}([A-Za-z]+)(?: |=)(?:"(.*?)"|([^ ]+))} {-foo bar} match
<1> [GRiMMY]: #1498 (505 clicks) Tcl error: regexp match variables not allowed when using -inline
<2> ;regexp -all -inline -- {-{1,2}([A-Za-z]+)(?: |=)(?:"(.*?)"|([^ ]+))} {-foo bar}
<1> [GRiMMY]: #1499 (5509 clicks) Tcl: {-foo bar} foo {} bar
<2> hmmm
<0> ?
<0> how do you do a ! in regexp as int !=
<0> nm
<0> its not important
<2> lol
<0> regexp -- {-{1,2}([A-Za-z]+)(?: |=)(?:"*(.*?)"*|([^ ]+))} {---foo "bar"} match cmd value ; puts "cmd=$cmd,value=$value"



<1> row_: #1506 (stdout) cmd=foo,value=bar
<0> how can I do something like (?:^()| )
<0> whould that work?
<2> no idea =P
<2> i can do simple regexp
<0> regexp -- {(?:^()| )-{1,2}([A-Za-z]+)(?: |=)(?:"*(.*?)"*|([^ ]+))} {---foo "bar"} match cmd value ; puts "cmd=$cmd,value=$value"
<1> row_: #1511 (stdout) cmd=foo,value=bar
<0> nope
<0> I have two regexps atm anyway
<0> its no biggy
<0> infact
<0> there will be a space
<0> due to my script
<0> I can check for a space
<0> \o/
<0> yes
<0> so the way it works would mean a left over space at the start
<0> hehee
<0> regexp -- {(?: )-{1,2}([A-Za-z]+)(?: |=)(?:"*(.*?)"*|([^ ]+))} { --foo "bar"} match cmd value ; puts "cmd=$cmd,value=$value"
<1> row_: #1523 (stdout) cmd=foo,value=bar
<0> regexp -- {(?: )-{1,2}([A-Za-z]+)(?: |=)(?:"*(.*?)"*|([^ ]+))} { ---foo "bar"} match cmd value ; puts "cmd=$cmd,value=$value"
<1> row_: #1524 (stdout) cmd=foo,value=bar
<0> wtf
<0> {1,2} should only let it repeat max of 2 times I thought?
<0> {m,n}
<0> a sequence of m through n (inclusive) matches of the atom; m may not exceed n
<3> why use regex for that btw
<0> why use regexp for what?
<3> matching params
<0> cause a range of cmds are p***ed into a array, the proc does not know what cmds to expect.
<0> and can be p***ed in any order.
<3> u dont need regex for that
<0> now someone tells me
<3> a foreach can handle it
<0> how so?
<0> split based on spaces?
<4> split -> http://www.tcl.tk/man/tcl8.4/TclCmd/split.htm
<3> no need to use split :)
<0> cause I need to capture spaces
<3> set arg "--foo i like horses --devil i can ride it"
<1> BL4DE: #1541 (212 clicks) Tcl: --foo i like horses --devil i can ride it
<2> BL4DE, tried tellin i had code without regexp before but =P
<0> [GRiMMY]: you said it did less.
<0> I am all for not using regexp
<0> so I ***umed I would not want it
<0> :/
<2> lol
<2> it uses --option=arg,arg2,arg3 --option=arg other stuff
<0> can I take a look?
<3> foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<3> ; foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<1> BL4DE: #1552 (4827 clicks) Tcl:
<3> ; puts $ary(foo)
<1> BL4DE: #1553 (stdout) i like horses i like horses
<3> ; puts $ary(devil)
<1> BL4DE: #1554 (stdout) i can ride it i can ride it
<2> there you go
<3> i ran it twice :)
<3> u might want to join em tho



<0> k
<0> that looks a lot nicer
<0> :/
<2> =P
<0> will that not add on bad syntax tho I take it
<2> lol
<0> set arg "--foo bar --value --value bah"
<1> row_: #1564 (218 clicks) Tcl: --foo bar --value --value bah
<0> foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<0> o_O
<0> foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<0> k...
<0> set arg "--foo bar --value bah"
<1> row_: #1569 (219 clicks) Tcl: --foo bar --value bah
<0> foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<0> it does not like me
<0> :(
<0> unset ary
<0> meh
<0> set arg "--foo bar --value --value bah"
<1> row_: #1575 (245 clicks) Tcl: --foo bar --value --value bah
<0> ; foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<1> row_: #1576 (2993 clicks) Tcl:
<0> k
<0> so I can report bad syntax if ary is not set
<0> cool thats good enough
<0> set arg "--foo bar --value bah"
<1> row_: #1580 (220 clicks) Tcl: --foo bar --value bah
<0> ; foreach item $arg { if {[string range $item 0 1] == "--"} { set val [string trimleft $item "-"] } elseif {[info exists val]} { lappend ary($val) $item } else { puts "w00t?" } }
<1> row_: #1581 (2486 clicks) Tcl:
<0> or it just does not like me
<0> updated it for shortcuts
<0> works nicely
<0> t
<0> ta*
<5> =)
<6> yeah okay FireEgl
<6> )
<6> :)
<6> lol
<7> .pid
<7> ;history
<1> badaas: #1613 (3467 clicks) Tcl error: invalid command name "history"
<7> ;after 3000 set state ready ; vwait state
<1> badaas: #1614 (594 clicks) Tcl error: after is disabled.
<7> ;package require registry 1.1
<1> badaas: #1615 (3901 clicks) Tcl error: invalid command name "::tclPkgUnknown"
<7> ;package require registry
<1> badaas: #1616 (3873 clicks) Tcl error: invalid command name "::tclPkgUnknown"
<7> set type [registry get HKEY_CL***ES_ROOT\\$ext {}]
<7> ;set type [registry get HKEY_CL***ES_ROOT\\$ext {}]
<1> badaas: #1618 (512 clicks) Tcl error: can't read "ext": no such variable
<7> ;set type [registry get HKEY_CL***ES_ROOT\\ {}]
<1> badaas: #1619 (3635 clicks) Tcl error: invalid command name "registry"
<7> bah
<7> ;proc tracer {varname args} {upvar #0 $varname var; puts "$varname was updated to be \"$var\"";}
<1> badaas: #1621 (539 clicks) Tcl:
<7> ;trace add variable foo write "tracer foo"
<1> badaas: #1622 (539 clicks) Tcl error: trace is disabled.
<7> BAH!
<0> bind pub -|- * someproc
<0> that should work should it not?
<7> bind pubm - * proc
<0> ah k
<8> fbsql: Error loading module: /xxx/modules-1.6.17/fbsql.so: Undefined symbol "__strtol_internal"
<8> any ideas anyone?
<7> maybe some package is missing that contains the '__strtol_internal' symbol
<7> some include or something, im guessing tho, as im winbloze ..
<8> i have never got that lovely error lol
<8> first i thought i might have compiled it wrong
<8> but i didnt :S
<9> I have made 2 scripts, 1 reacts to just !trigger the other reacts to !trigger variable, there seems to be some delay between the bind and the proc on the '!trigger variable', yet the '!trigger' works fine.
<9> I am using sql for the 'trigger variable' but the delay is well before it gets to the sql sections


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #eggtcl
or
Go to some related logs:

what's the difference between dynamat and dynamat xtreme
#nintendo
#beginner
accedently uninstalled invidia drivers
#c
#debian
#beginner
#freebsd
#ubuntu
#flash



Home  |  disclaimer  |  contact  |  submit quotes