Forum OpenACS Q&A: Response to Users doing Lines, Gotta Stop 'em REGSUB

Collapse
Posted by Tom Jackson on

You should probably set a var equal to the string you want to replace, and the replacement:

set reg {some_reg} 
set replacement {some_replacement}
regsub -all $reg $responses $replacement responses

Don't use quotes around the value, use curlys. Same goes for string match. The pattern should be in curlys, not quotes, or set beforehand.