.
D 2005-01-14T13:26:05
J assignee pvgoran
J cmimetype text/plain
J comment set\spat1\s{a{0}}\nset\spat2\s{a{1}}\nset\spat3\s{a{0,1}}\n\nset\sstring\s"xyz"\nforeach\si\s[list\s$pat1\s$pat2\s$pat3]\s{\n\s\s\s\s\s\s\s\sputs\s"Does\s$string\smatch\s$i?\s[expr\s[regexp\s--\n$i\s$string]\s?\syes\s:\sno]"\n}\n\nset\sstring\s"abc"\nforeach\si\s[list\s$pat1\s$pat2\s$pat3]\s{\n\s\s\s\s\s\s\s\sputs\s"Does\s$string\smatch\s$i?\s[expr\s[regexp\s--\n$i\s$string]\s?\syes\s:\sno]"\n}\n\nThe\sabove\scode\swas\sexpected\sto\sreport\sthat\sin\sthe\sfirst\nloop,\sa\syes,\sthen\stwo\snos\sand\sin\sthe\ssecond\sloop,\sone\nno\sthen\stwo\syeses.\n\nOn\ssparc\ssolaris\swith\s8.4.8\s(and\s8.5a2),\sI\sget\sthis\ninstead:\n\s$\s./tclsh8.4\s/tmp/testre\s\s\s\s\s\s\s\s\s\s\nDoes\sxyz\smatch\sa{0}?\syes\nDoes\sxyz\smatch\sa{1}?\sno\nDoes\sxyz\smatch\sa{0,1}?\syes\nDoes\sabc\smatch\sa{0}?\syes\nDoes\sabc\smatch\sa{1}?\syes\nDoes\sabc\smatch\sa{0,1}?\syes\n
J foundin obsolete:\s8.4.9
J priority 5\sMedium
J resolution None
J status Open
J submitter lvirden
J subsystem 43.\sRegexp
J title regexp\sa{0}\sprovides\sincorrect\sresults
J type Bug
K 1102326fffffffffffffffffffffffffffffffff
U lvirden
Z 0b34fe2856c70ef6a0b08cd42d845b2d