one of many options: using regex replace
System.Text.RegularExpressions.Regex.Replace(strText,"\b(\d+)\b","'$1'")