Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4157eba7f4851be40d415fe8cd2a7aa351a4c3d2
Ticket: 1366683fffffffffffffffffffffffffffffffff
lsearch -regexp does not support regexp's w/backreferences
User & Date: cleverly on 2005-11-26 01:04:29
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    % info patchlevel
    8.4.11
    % regexp {^.(.)\1.$} 1220
    1
    % lsearch -regexp {1200 1210 1220 1230 1240 1250}
    {^.(.)\1.$}
    couldn't compile regular expression pattern: invalid
    backreference number
    
    On the chat Jeff Hobbs pointed out that it is because
    [lsearch -regexp] compiles the regular expression with
    the TCL_REG_NOSUB flag set (which inhibits capturing
    parenthesis which backreferences require).  Simply fix
     is to remove the TCL_REG_NOSUB flag?
    
    I think that [lsearch -regexp] should support regexp's
    with backreferences, or, at the least, the man page
    updated with the caveat that it doesn't support
    backreferences (and a better error message).
    
  4. foundin changed to: "obsolete: 8.4.11"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "cleverly"
  9. subsystem changed to: "17. Commands I-L"
  10. title changed to:
    lsearch -regexp does not support regexp's w/backreferences
    
  11. type changed to: "Bug"