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
- assignee changed to: "pvgoran"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.4.5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "rickmacd"
- subsystem changed to: "43. Regexp"
- title changed to: "lsearch -regexp error introduced in 8.4.2"
- type changed to: "Bug"