找到每个字符时如何用空格替换逗号 [英] how to replace a comma with a space when it finds at every character

查看:97
本文介绍了找到每个字符时如何用空格替换逗号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当发现每个字符时如何用空格替换逗号
因为我的csv文件还在数据中包含逗号

how to replace a comma with a space when it finds at every character
because my csv file contains comma in the data also

推荐答案

没有简单的解决方案.尽管您可以使用简单的string.replace,它也会在数据字段中找到逗号,而不仅仅是字段分隔符.
您可能要看一下此工具, http://www.filehelpers.com/ [
There is no easy solution. Although you could use a simple string.replace it will find the commas in the data fields also not just the field separators.
You may want to look at this tool, http://www.filehelpers.com/[^]


将文件读入字符串,然后content.Replace(",", " ")并保存结果返回文件.
Read the file into a string and then content.Replace(",", " ") and save the result back to the file.


这篇关于找到每个字符时如何用空格替换逗号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆