set item i of templateItems to (asocString's stringByReplacingOccurrencesOfString:"([\\$])" withString:"\\\\$1" options:(current application's NSRegularExpressionSearch) range:{0, asocString's |length|()}) as text