Posted to tcl by dandyn at Thu Oct 03 16:15:19 GMT 2024view pretty

set dirty {BILLY BUTT: Hi there fellow TCL coders. Test $5 billion test test..}

# I need some fix in this code below to escape the error.. 
set dirty [subst [regsub -- {^([A-ZÅÄÖ]{3,12})\s([A-ZÅÄÖ]{3,15}):\s} $dirty {[string totitle \1] [string totitle \2]: }]]




#ERROR
#can't read "5": no such variable
#    while executing
#   "subst [regsub -- {^([A-ZÅÄÖ]{3,12})\s([A-ZÅÄÖ]{3,15}):\s}