Strip control codes and extended characters from a string: Difference between revisions

Content added Content deleted
m (tidy)
(→‎Tcl: Added implementation (based on REs))
Line 102:
---------
=CG(x 4|)9j)<~-vPQFh"[dq#p</pre>
 
=={{header|Tcl}}==
<lang tcl>proc stripAsciiCC str {
regsub -all {[\u0000-\u001f\u007f]+} $str ""
}
proc stripCC str {
regsub -all {[^\u0020-\u007e]+} $str ""
}</lang>