Skip to content
Tcl Source Code Artifact [86e42145a1]
Login

Artifact [86e42145a1]

Artifact 86e42145a1983c48c59504984ea510954dd8360c:

Ticket change [86e42145a1] - Closed ticket [1490503fffffffff|1490503fff]: <i>regexp within foreach loop matches wrong</i> plus 8 other changes by msofer on 2006-05-18 03:59:37.
D 2006-05-18T03:59:37
J assignee msofer
J closedate 2006-05-17T20:59:37
J closer msofer
J icomment Logged\sIn:\sYES\s\nuser_id=148712\n\nThe\sbug\sis\sactually\sin\sTcl8.3\s(although\sI\sdid\snot\sconfirm\nthe\sbehaviour\sthere),\sthe\sbehaviour\sin\s8.4\sis\scorrect.\n\nYour\sscript\sis\smissing\ssome\sbraces\sin\sorder\sto\sperform\naccording\sto\syour\sexpectation:\sit\sshould\sbe\n\n\s\sif\s{[regexp\s...]}\s{\n\s\s\s\s\s\ssend_user\s">KEY\s$key\sVALUE\s$value\\n"\n\s\s}\selseif\s{[regexp\s...]\s{\n\s\s\s\s\s\ssend_user\s"KEY2\s$key\sVALUE\s$value\\n"\n\s\s}\n\nPlease\snote\sthat\sthe\sconditions\sto\s'if\s...\selseif'\sare\nenclosed\sin\sbraces.\sThis\smeans\sthat\sthey\sare\spassed\sto\s'if'\nas\sstrings;\swhen\s'if'\sevals\sthe\sfirst\scondition\sand\sfinds\sit\nis\strue,\sit\snever\sevaluates\sthe\ssecond.\n\nIn\syour\sscript\sas\sposted,\sboth\sregexp's\sare\sevaluated\n*before*\sthey\sare\spassed\sas\sarguments\sto\s'if';\sso,\seven\swhen\nthe\sfirst\sregexp\smatches,\sthe\svalues\s$key\sand\s$value\sare\sset\nby\sthe\ssecond\sregexp.\n
J login msofer
J mimetype text/plain
J resolution Invalid
J status Closed
J username msofer
K 1490503fffffffffffffffffffffffffffffffff
U msofer
Z e4ef87bf27803378286b2e656caffcbc