cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace tabs with commas in string function Replace?

CR
Level 4
Looking for how to use Replace for keys such as tab? Tried Replace([string1], "\t",[string2]) . This does not appear to work. Thanks
3 REPLIES 3

CR
Level 4
Sorry actually the above should be  Replace([string1], ""\t"", "",""). \t does not seem to be recognized.

AbhilashSingha1
Level 3
Try copying the tab(Means the space, copy it from data item where you have your string stored) and paste it in place of \t . Replace([Data1],""        "","","").  this worked for me   Thanks  

Joshi_KumarA_V
Level 3
If replacing the space also doens't work, then it must be checked against the ASCII equivalent of \t.    Tyr the following approach:    string strWithTabs = ""here is a string\twith a tab""; char tab = '\u0009'; String line = strWithTabs.Replace(tab.ToString(), """");