Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c5e33e0963cba196c0acef03cfa28862c18433a7
Ticket: ded7528bffe8bdf4cf5ab9f327b50b207777378e
subst/regsub/format/scan gets confused by braces
User & Date: dgp on 2014-02-16 04:02:44
Changes

  1. icomment:
    All that said, if you just want to replace the open brace
    with the string \u007b and the close brace with the string \u007d
    then the tool to use is [string map]
    
    % set s {foo {} bar}
    foo {} bar
    
    % set result [string map [list "{" {\u007b} "}" {\u007d}] $s]
    foo \u007b\u007d bar
    
  2. login: "dgp"
  3. mimetype: "text/plain"