How to replace tabs with commas in string function Replace?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-09-18 02:24 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-09-18 02:27 AM
Sorry actually the above should be Replace([string1], ""\t"", "",""). \t does not seem to be recognized.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-09-18 07:07 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-09-18 08:43 AM
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(), """");
