From: <no...@so...> - 2001-03-16 20:55:30
|
Bugs item #219233, was updated on 2000-10-25 22:03 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=219233&group_id=10894 Category: Commands M-Z Group: 8.3 Status: Open >Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Donal K. Fellows (dkf) Summary: string match doesn't work as documented when - is the last c Initial Comment: OriginalBugID: 4438 Bug Version: 8.3 SubmitDate: '2000-03-21' LastModified: '2000-04-03' Severity: MED Status: Assigned Submitter: techsupp ChangedBy: hobbs OS: Windows 95 OSVersion: OSR2 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Keith Lea ReproducibleScript: % string match {[a-z0-9_/-]} \ 1 % string match {[a-z0-9_/]} \ 0 It's accidently interp'ing the "/-]" as "/-]]", taking last ] as ] endrange and ] endblock. -- 04/03/2000 hobbs This needs to be fixed in Tcl_String(Case)Match in tclUtil.c, but wait until 8.4 just in case someone was counting on the previous perverse behavior. -- 04/03/2000 hobbs ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2001-03-16 12:57 Message: Logged In: YES user_id=79902 This behaviour won't be changed before 9.0 Any fixes that *are* done must be applied to code in both tclUtil.c and tclUtf.c ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2001-02-23 02:24 Message: See Patch #103932 https://sourceforge.net/patch/?func=detailpatch&patch_id=103932&group_id=10894 ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2001-02-15 08:32 Message: Apparently, the way [string match] handles syntactically invalid patterns is by failing to match anything at all. It's not entirely clear to me that this is an optimal strategy... ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2000-11-24 05:18 Message: Improved detection of bug: % sstring match \[a-] ] 1 % string match \[a-]x ]x 0 ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2000-11-24 03:35 Message: Hmm. The problem seems to be that the first pattern is actually malformed by the rules of [string match], but there is no way to indicate this. I suppose the correct way of dealing with this is to decide that we were not really matching a range after all, but that's not very good at all. Either that, or we state that a malformed pattern matches nothing at all. Hmm. On successful matching of a range, should we really back up a character at the unexpected end of string , or should we fail at that point? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=219233&group_id=10894 |