Artifacts Associated With Ticket 1230836fffffffffffffffffffffffffffffffff
Ticket change [6c34b509a2] (rid 128461) by elfring on 2005-07-01 09:45:38:
- assignee initialized to: "pvgoran"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I convert the discussion "non-greedy is too greedy" into this bug report. http://groups.google.de/group/comp.lang.tcl/browse_frm /thread/fd3fa4545458bbf7/0026661d93360192 Pattern examples: % regexp {^(\d+),(.+?),} 11,A,B,C X Y Z 1 % puts "a) $Y|$Z" a) 11|A,B % regexp {^(\d+?),(.+?),} 12,A,B,C X Y Z 1 % puts "b) $Y|$Z" b) 12|A % regexp {^..,(.+?),} 13,A,B,C X Y 1 % puts "c) $Y" c) A Why can the change to a lazy quantifier in the first part change the match of the capturing parentheses in the second part? - Are there any flags in the processing not reset when the first comma is reached? - Does the expression compiler generate a FSM with unexpected states? - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "elfring"
- subsystem initialized to: "43. Regexp"
- title initialized to: "Check independency of subpatterns"
- type initialized to: "Bug"
Ticket change [a2a0b37952] (rid 257603) by serhiy.storchaka on 2026-10-11 10:51:38:
- icomment:
Documented: <code>\d+</code> is the first quantified atom, so the whole RE prefers the longest match, and <code>(.+?)</code> is fitted within it. Workarounds: <code>(?:^(\d+),(.+?),){1,1}?</code> or <code><nowiki>^(\d+),([^,]+),</nowiki></code>; both give <code>A</code>. The docs are clarified in branch [/timeline?r=doc-re-syntax-preference|doc-re-syntax-preference]. Duplicate of [219219ffff]. - login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [2c80043deb] (rid 257607) by serhiy.storchaka on 2026-10-11 10:52:40:
- login: "serhiy.storchaka"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
Ticket change [2e2cc56e88] (rid 259885) by serhiy.storchaka on 2026-10-22 17:19:24:
- closedate changed to: "2461324.9532513544"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"