Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fa1bbaf5facb71b99e332b83c01d5814c5d099f9
Ticket: 755335ffffffffffffffffffffffffffffffffff
regsub won't substitute against an empty string
User & Date: vincentdarley on 2003-06-17 00:09:16
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    Here's another regsub issue:
    
    % regsub -all -lineanchor -- {^#[^\n]*\n} \
           "#one\n#two\n#three\n" foo\n
    foo
    #two
    foo
    
    I believe the buggy line is tclCmdMZ.c:734:
    
    match = Tcl_RegExpExecObj(interp, regExpr, objPtr, 
    offset,
    10 /* matches */, ((offset > 0) ? 
    TCL_REG_NOTBOL : 0));
    
    where 'TCL_REG_NOTBOL' should only be added as a flag if 
    offset>0 _and_ the the 'offset-1'th character of objPtr is not 
    a newline.
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"