Skip to content
Tcl Source Code Artifact [a91be4badb]
Login

Artifact [a91be4badb]

Artifact a91be4badb27dabc0400babe250f40dc5157421a:

Ticket change [a91be4badb] - New ticket [219219ffffffffff|219219ffff] <i>greedy vs. non-greedy confusion</i>. by nobody on 2000-10-26 05:03:45.
D 2000-10-26T05:03:45
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4001\sBug\nVersion:\s8.2.3\nSubmitDate:\s'2000-01-10'\nLastModified:\s'2000-01-27'\nSeverity:\sMED\nStatus:\sAssigned\nSubmitter:\stechsupp\nChangedBy:\shobbs\nRelatedBugIDs:\s2866\nOS:\sBSD\nOSVersion:\sNetBSD-1.4.1/i386\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\shume\ssmith\n\nReproducibleScript:\n>\stclsh\n%\sregexp\s{x.*?([a-z]+)}\s{1234x56789word101112}\sa\sb\n1\n%\sset\sa\nx56789w\n%\sset\sb\nw\n%\sset\stcl_patchLevel\n8.2.3\n%\n\nObservedBehavior:\nthe\s+\swas\smatched\sin\sa\snongreedy\sfashion;\sshouldn't\sit\sbe\sgreedy?\n\nDesiredBehavior:\n%\sset\sa\nx56789word\n%\sset\sb\nword\n%\n\nPatch:\n\n\nPatchFiles:\n\n\n\n\nHenry\sSpencer\shas\snoted\ssome\sproblems\swith\smixing\sgreedy\sand\nnon-greedy\squantifiers\sin\sthe\snew\sregexp\scode.\s\sHe's\scc'ed\son\nthis,\sbut\sin\sthe\smeantime,\sthe\swork-around\sis:\n\s\s\s\sregexp\s{x[^a-z]*([a-z]+)}\s{1234x56789word101112}\sa\sb\s\n--\s01/10/2000\shobbs\nFrom\sHS:\n\nThis\sis\sthe\ssame\sold\sproblem:\s\speople\saccustomed\sto\sPerl\sare\snot\sgrasping\nthe\sidea\sthat\sthe\swhole\sRE\sis\sgreedy\sor\snon-greedy,\sbut\s*not*\ssome\smixture\nof\sthe\stwo.\s\sIn\sthis\scase,\sit\sis\snon-greedy\ssince\sthe\sfirst\sthing\sin\sit\nwhich\scares\sis\snon-greedy.\s\sThe\s+\sis\sbeing\sas\sgreedy\sas\sit\scan,\swithin\sthe\nconstraints\sset\sby\sthe\sbehavior\sof\sthe\swhole\sRE.\s\n\nIn\sshort,\sthe\sbehavior,\swhile\ssurprising,\sis\sas\sdocumented.\s\sIt's\snot\san\noutright\sbug;\sit\smay,\showever,\sbe\sa\smisfeature.\n\s\n--\s01/10/2000\shobbs
J foundin final:\s8.2.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 43.\sRegexp
J title greedy\svs.\snon-greedy\sconfusion
J type Bug
K 219219ffffffffffffffffffffffffffffffffff
U nobody
Z fff12b2adcb476d66b9cc05d1ab9ed70