Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5da21b2f9a75290d9b622f085b563b94d74324ab
Ticket: 906616ffffffffffffffffffffffffffffffffff
lsearch -regexp error introduced in 8.4.2
User & Date: rickmacd on 2004-02-28 21:34:47
Changes

  1. assignee changed to: "pvgoran"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    When a list containing an embedded list element
    starting with a number is used as a regexp in lsearch,
    a parsing error occurs:
    
    couldn't compile regular expression pattern: invalid
    repetition count(s)
    
    If the first element is a text string (eg {zxcv 1234})
    the error does not occur. 
    
    I hit this problem when moving from 8.3.3 to 8.4.5. I
    tried every 8.4 release (downloaded directly from SF
    and built fresh) and determined it first broke in
    8.4.2. I hope this helps.
    
    /usr/local/src/tcltk/tcl8.4.1/unix$ gcc --version
    gcc (GCC) 3.3.3 20040125 (prerelease) (Debian)
    
    The details below apply to tests run on Solaris 5.8 and
    Linux (Debian sid). Platform/OS does not seem to be an
    issue.
    
    It is the {1234 zxcv} element in the following list
    that triggers the problem:
    
    % list "" 2134 qwer "1234 zxcv" 2345 asdf
    {} 2134 qwer {1234 zxcv} 2345 asdf
    
    In the examples below I'm searching an empty list but
    this is just to simplify the examples and isn't an issue.
    
    /usr/local/src/tcltk/tcl8.4.2/unix$
    LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./tclsh
    % info patchlevel
    8.4.2
    % lsearch -regexp {} ^[list "" 2134 qwer "1234 zxcv"
    2345 asdf]
    couldn't compile regular expression pattern: invalid
    repetition count(s)
    % lsearch -regexp {} ^[list "" 2134 qwer "zxcv 1234"
    2345 asdf]
    -1
    % lsearch -regexp {} ^[list "" 2134 qwer "asdf zxcv"
    2345 asdf]
    -1
    % exit
    
    
    /usr/local/src/tcltk/tcl8.4.1/unix$
    LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./tclsh 
    % info patchlevel
    8.4.1
    % lsearch -regexp {} ^[list "" 2134 qwer "1234 zxcv"
    2345 asdf]
    -1
    % lsearch -regexp {} ^[list "" 2134 qwer "zxcv 1234"
    2345 asdf]
    -1
    % lsearch -regexp {} ^[list "" 2134 qwer "asdf zxcv"
    2345 asdf]
    -1
    % exit
    
    
  4. foundin changed to: "obsolete: 8.4.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rickmacd"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "lsearch -regexp error introduced in 8.4.2"
  11. type changed to: "Bug"