It would be much safer to it on a field by field basis. If done that way:
set phoneNo [string map “( {} } {} – {}” $phoneNum]
set ssan [string map “- {}” $ssan]
If you want to take a chance that the patterns occur only in SSN and Phone numbers, you could do a proc like
# replace all pattern (###)###-##### with ##########
regsub -all — {((d{3}))(d{3})-(d{4})} $phoneNum {123} newNum
# replace all pattern ###-##-#### with #########
regsub -all — {(d{3})-(d{2})-(d{4})} $ssn {123} newSSN