Skip to content
Tcl Source Code History Of Ticket 219232ffffffffff
Login

History Of Ticket 219232ffffffffff

Artifacts Associated With Ticket 219232ffffffffff

  1. Ticket change [4e58fb63a7] (rid 127216) by nobody on 2000-10-26 05:03:55:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
      
      
    4. foundin initialized to: "obsolete: 8.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "43. Regexp"
    10. title initialized to: "Error in reporting indices in regexps"
    11. type initialized to: "Bug"
  2. Ticket change [de997c584c] (rid 114881) by dkf on 2000-11-10 17:59:06:

    1. foundin changed to: "obsolete: 8.3.2"
    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.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. priority changed to: "6"
    6. username: "dkf"
  3. Ticket change [cbf30efee5] (rid 95605) by dkf on 2001-06-10 09:47:35:

    1. 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...)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. subsystem changed to: "18. Commands M-Z"
    5. username: "dkf"
  4. Ticket change [b33fffb93f] (rid 98495) by dkf on 2001-06-12 15:08:25:

    1. closedate changed to: "2001-06-12T08:08:25"
    2. closer changed to: "dkf"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"