Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 97ee09a60b51f9d21f58c73c51bfa24d784fbe64
Ticket: 218054ffffffffffffffffffffffffffffffffff
weird behaviour of regexp and "" subMatchVar's
User & Date: nobody on 2000-10-26 00:52:38
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1446 Bug
    Version: 8.0.4
    SubmitDate: '1999-03-04'
    LastModified: '1999-07-02'
    Severity: LOW
    Status: Closed
    Submitter: pat
    ChangedBy: stanton
    OS: Windows NT
    OSVersion: 4.0
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '1999-07-02'
    
    
    Name:
    vince darley
    
    Extensions:
    none
    
    ReproducibleScript:
    % regexp {abc([a-zA-Z]+)abc} "abcblahblahabc" "" middle
    1
    % set ""
    abcblahblahabc
    
    ObservedBehavior:
    My understanding was that "" can be used to tell regexp you don't care about a given subMatchVar, but it appears as if regexp instead sets the variable with null-name to the given match.
    
    This behaviour is counter-intuitive, and removes the possibility of an efficiency gain which would be had by not bothering to set the "" variables which the user clearly declared they don't want.
    
    
    
    This happens in Tcl 8.0.x and 8.1.x
    
    07/02/1999 10:52 - stanton - "" is a valid variable name, so the behavior is correct.  The user should use non-capturing parentheses in 8.1 to avoid extracting values unnecessarily
    
    
    
  4. foundin changed to: "obsolete: 8.0.4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "weird behaviour of regexp and "" subMatchVar's"
  11. type changed to: "Bug"