Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 93665016d08b59db48affada2ac3c4470e4364d0
Ticket: 1102326fffffffffffffffffffffffffffffffff
regexp a{0} provides incorrect results
User & Date: lvirden on 2005-01-14 13:26:05
Changes

  1. assignee changed to: "pvgoran"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    set pat1 {a{0}}
    set pat2 {a{1}}
    set pat3 {a{0,1}}
    
    set string "xyz"
    foreach i [list $pat1 $pat2 $pat3] {
            puts "Does $string match $i? [expr [regexp --
    $i $string] ? yes : no]"
    }
    
    set string "abc"
    foreach i [list $pat1 $pat2 $pat3] {
            puts "Does $string match $i? [expr [regexp --
    $i $string] ? yes : no]"
    }
    
    The above code was expected to report that in the first
    loop, a yes, then two nos and in the second loop, one
    no then two yeses.
    
    On sparc solaris with 8.4.8 (and 8.5a2), I get this
    instead:
     $ ./tclsh8.4 /tmp/testre          
    Does xyz match a{0}? yes
    Does xyz match a{1}? no
    Does xyz match a{0,1}? yes
    Does abc match a{0}? yes
    Does abc match a{1}? yes
    Does abc match a{0,1}? yes
    
    
  4. foundin changed to: "obsolete: 8.4.9"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "lvirden"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "regexp a{0} provides incorrect results"
  11. type changed to: "Bug"