Artifacts Associated With Ticket 219232
Ticket change [4e58fb63a7] (rid 127216) by nobody on 2000-10-26 05:03:55:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 4391 Bug Version: 8.3 SubmitDate: '2000-03-17' LastModified: '2000-03-29' Severity: MED Status: Assigned Submitter: techsupp ChangedBy: ericm OS: Linux FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Laurent Riesterer ReproducibleScript: % regexp -nocase -all -inline -- {aa.*?(--(.*?)--|==(.*?)==).*?aa} \ "aa....--match1--........aa,,,,,,,aa....==match2==........aa" aa....--match1--........aa --match1-- match1 {} aa....==match2==........aa ==match2== {} match2 % regexp -indices -nocase -all -inline -- {aa.*?(--(.*?)--|==(.*?)==).*?aa} \ "aa....--match1--........aa,,,,,,,aa....==match2==........aa" {0 25} {6 15} {8 13} {-1 -1} {33 58} {39 48} {25 25} {41 46} % ObservedBehavior: the empty submatch in second match reports correctly {} but indices report {25 25} instead of {-1 -1} DesiredBehavior: I should can {-1 -1} for all the empty submatches in all the matches Verified with 8.3.0 on Linux. - eric -- 03/29/2000 ericm This happens in 8.2.3 as well: % regexp -indices -start 26 {aa.*(--(.*)--|==(.*)==).*aa} "aa....--match1--........aa,,,,,,,aa....==match2==........aa" a b c d 1 % set a 33 58 % set b 39 48 % set c 25 25 % set d 41 46 Hopefully, Henry can help us out. - eric -- 03/29/2000 ericm - foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "43. Regexp"
- title initialized to: "Error in reporting indices in regexps"
- type initialized to: "Bug"
Ticket change [de997c584c] (rid 114881) by dkf on 2000-11-10 17:59:06:
- foundin changed to: "obsolete: 8.3.2"
- icomment:
It seems to be adding the index of the start of the match area from the second time round to each of the indices that should be -1. The following is a simpler expression of the problem, with a few extra spaces thrown in to distinguish the indices from the first match from those of the second match. % regexp -indices -inline -all a(b(c)d|e(f)g)h abcdhaefgh {0 4} {1 3} {2 2} {-1 -1} {5 9} {6 8} {4 4} {7 7} You could try, as a work-around, excluding all indices that refer to indices prior to the start of the current match area. This is much less than ideal though. - login: "dkf"
- mimetype: "text/plain"
- priority changed to: "6"
- username: "dkf"
Ticket change [cbf30efee5] (rid 95605) by dkf on 2001-06-10 09:47:35:
- icomment:
Logged In: YES user_id=79902 Oh, this is actually a fault in tclCmdMZ.c; Tcl_RegexpObjCmd needs to check for non-negative submatch values before adding the offset (lines 372 and 373...)
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "18. Commands M-Z"
- username: "dkf"
- icomment:
Ticket change [b33fffb93f] (rid 98495) by dkf on 2001-06-12 15:08:25:
- closedate changed to: "2001-06-12T08:08:25"
- closer changed to: "dkf"
- resolution changed to: "Fixed"
- status changed to: "Closed"