Artifacts Associated With Ticket 1076248
Ticket change [6a05297568] (rid 128074) by nobody on 2004-11-30 20:20:23:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tested on ActiveTcl build8.4.8 and self-built 8.4.8 on Red hat 9.0 tclsh % set test_string "</Config>" </Config> % if [ regexp "^</(.*)>" $test_string jerk cfg_line ] { puts $cfg_line } elseif [ regexp "^<(.*)>" $test_string jerk cfg_line ] { } /Config % if [ regexp "^</(.*)>" $test_string jerk cfg_line ] { puts $cfg_line } elseif [ regexp "^<(.*)>" $test_string jerk cfg_line2 ] { } Config % - foundin initialized to: "obsolete: 8.4.8"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "if command error"
- type initialized to: "Bug"
Ticket change [7ebbf21ffe] (rid 97465) by hobbs on 2004-12-01 07:06:36:
- closedate changed to: "2004-12-01T00:06:36"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Pilot error - you must {} exprs, otherwise they are eval'ed as expected. In both cases, both regexps are evaled, you just change the var for the 2nd RE in the 2nd case. - login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "hobbs"
Ticket change [876dd82519] (rid 131694) by dkf on 2004-12-01 16:09:16:
- icomment:
Logged In: YES user_id=79902 Elaborating on what Jeff said, you probably meant to say this: if {[ regexp "^</(.*)>" $test_string jerk cfg_line ]} { puts $cfg_line } elseif {[ regexp "^<(.*)>" $test_string jerk cfg_line ]} { } Notice the {} round the invokations of [regexp]? It's important (and it also helps the code go faster as a bonus.) - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [c00002f1d4] (rid 102337) by dgp on 2004-12-01 23:41:57:
- icomment:
Logged In: YES user_id=80530 The confusion here arises because Tcl was apparently buggy in releases 8.0 through 8.3 on this point, and only in 8.4 did it get corrected. still looking for the relevant bug report.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [bdbb4bb137] (rid 101955) by dgp on 2004-12-01 23:56:50:
- icomment:
Logged In: YES user_id=80530 Probably was Bug 219166.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: