Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 57f14f8663e6452682c06fcbb0491f088b673b75
Ticket: 84af1192f514f190a1d14f31394ced8b6816e633
"regsub -all c.*" is errorneously compiled to "string map"
User & Date: dkf on 2014-09-09 19:55:29
Changes

  1. closedate changed to: "2456910.33020735"
  2. closer changed to: "dkf"
  3. icomment:
    Minimal test is to look at result of:
    <pre>
    regsub -all {\(.*} 123(qwe) ""
    </pre>
    Which should be 3 characters long.
    <p>
    This is now fixed. The problem was that the <tt>.*</tt> at the end of the pattern was being interpreted as if it wasn't there, which is correct for non-capturing <tt>regexp</tt> but wrong for <tt>regsub</tt> (which is effectively always capturing).
    <p>
    There would have also been a problem with this more unusual pattern (it's the same cause as above, the identical bug and the identical fix):
    <pre>
    regsub -all {.*\(} 123(qwe) ""
    </pre>
    
  4. login: "dkf"
  5. mimetype: "text/html"
  6. resolution changed to: "Fixed"
  7. status changed to: "Closed"