Insert special character after and before a string

one of many options: using regex replace

System.Text.RegularExpressions.Regex.Replace(strText,"\b(\d+)\b","'$1'")