I may be simplifying this a bit much, but all you are wanting to do is place a space in front of the “}” unless a space is already there correct?
Example: {TOM}{WAS }{HERE}
Should become: {TOM }{WAS }{HERE }
Is this what you are wanting? If so, then just have two regsubs.
The first: regsub -all — ” }” $text “}” text
The second: regsub -all — “}” $text ” }” text
This should give you what you want without having to worry about the backslashes…
Then again…I may be way off in understanding what you are looking for.