Skip to content
Tcl Source Code Artifact [a3f46d26f5]
Login

Artifact [a3f46d26f5]

Artifact a3f46d26f5a2949271fcdee3db83a321c9233cc4:

Ticket change [a3f46d26f5] - Ticket [3063568fffffffff|3063568fff] <i>regsub example doesn&#39;t perform as advertized</i> status still Open with 4 other changes by dkf on 2010-09-10 19:55:19.
D 2010-09-10T19:55:19
J icomment Updated\sexample\stext\sis\sas\sbelow.\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sThis\sRE\sis\sjust\sa\scharacter\sclass\sfor\salmost\severything\s"bad"\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sset\sRE\s{[][{};#\\\\\\$\s\\r\\t\\u0080‐\\uffff]}\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sWe\swill\ssubstitute\swith\sa\sfragment\sof\sTcl\sscript\sin\sbrackets\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sset\ssubstitution\s{[format\s\\\\\\\\u%04x\s[scan\s"\\\\&"\s%c]]}\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sNow\swe\sapply\sthe\ssubstitution\sto\sget\sa\ssubst‐string\sthat\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\swill\sperform\sthe\scomputational\sparts\sof\sthe\sconversion.\sNote\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sthat\snewline\sis\shandled\sspecially\sthrough\sstring\smap\ssince\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sbackslash‐newline\sis\sa\sspecial\ssequence.\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sset\squoted\s[subst\s[string\smap\s{\\n\s{\\\\u000a}}\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s[regsub\s-all\s$RE\s$string\s$substitution]]]\n\n
J login dkf
J mimetype text/plain
J username dkf
K 3063568fffffffffffffffffffffffffffffffff
U dkf
Z 866965afeab567467b865588c2ec7c34