Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3ab0a4867a3dbe0bcab27f94d686b22ba5e76b1f
Ticket: 823524ffffffffffffffffffffffffffffffffff
bug in regsub in tcl8.4 version
User & Date: hemanglavana on 2003-10-14 15:47:31
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    There seems to be a bug in regsub command in tcl8.4
    version:
    
    (bin) 1 % info patch
    8.4.5
    (bin) 2 % set b "a\nb\nc\nd"
    a
    b
    c
    d
    (bin) 3 % regsub -all -line ^ $b #
    #a
    ##b
    ##c
    ##d
    (bin) 4 % regsub -all -line ^ $b # c
    7
    (bin) 5 % set c
    #a
    ##b
    ##c
    ##d
    (bin) 6 % package provide TclDevKit
    3.0
    (bin) 7 %
    
    Note the ## for b, c and d lines. The tclversion is the
    one provided by AK with TclDevKit3.0 pre-release.
    Here's the output of correct behavior with tcl8.3:
    
    squish:43> tclsh
    % info patch
    8.3.3
    % set b "a\nb\nc\nd"
    a
    b
    c
    d
    % regsub -all -line ^ $b #
    wrong # args: should be "regsub ?switches? exp string
    subSpec varName"
    % regsub -all -line ^ $b # c
    4
    % set c
    #a
    #b
    #c
    #d
    % 
    
  4. foundin changed to: "obsolete: 8.4.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "hemanglavana"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "bug in regsub in tcl8.4 version"
  11. type changed to: "Bug"