<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hey, Scripting Guy! How Can I Remove Specified Commas from a Comma-Separated Values File?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2008/06/16/how-can-i-remove-specified-commas-from-a-comma-separated-values-file.aspx</link><description>Hey, Scripting Guy! I have a comma-separated values file in which several fields have a comma embedded in the field value; that’s causing problems when I try and import the information into another application. I was wondering if there is a way to remove</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Hey, Scripting Guy! How Can I Remove Specified Commas from a Comma-Separated Values File?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2008/06/16/how-can-i-remove-specified-commas-from-a-comma-separated-values-file.aspx#3505264</link><pubDate>Thu, 21 Jun 2012 19:40:58 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3505264</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;The thing is that embedded commas are not an issue with CSV file types when they use quoted strings.&lt;/p&gt;
&lt;p&gt;The ADO text provider and PowerSHell read files like this with no problems and no conversion needed.&lt;/p&gt;
&lt;p&gt;In PosH just do this:&lt;/p&gt;
&lt;p&gt;import-csv withcommas.csv -header F1,F2,F3,F4,F5&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3505264" width="1" height="1"&gt;</description></item><item><title>re: Hey, Scripting Guy! How Can I Remove Specified Commas from a Comma-Separated Values File?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2008/06/16/how-can-i-remove-specified-commas-from-a-comma-separated-values-file.aspx#3505222</link><pubDate>Thu, 21 Jun 2012 15:52:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3505222</guid><dc:creator>DM Clark</dc:creator><description>&lt;p&gt;If you are working with standard files etc. like you get from prime brokers et al you can simplify this greatly. Example:&lt;/p&gt;
&lt;p&gt;In file&lt;/p&gt;
&lt;p&gt;&amp;quot;2012-06-20&amp;quot;,&amp;quot;MAC02TD34&amp;quot;,&amp;quot;03811111&amp;quot;,&amp;quot;MY TEXT WITH, WITH A COMMA.&amp;quot;,2379.0000&lt;/p&gt;
&lt;p&gt;&amp;quot;2012-06-20&amp;quot;,&amp;quot;MAC02TD34&amp;quot;,&amp;quot;03811111&amp;quot;,&amp;quot;MY TEXT WITH, WITH A COMMA.&amp;quot;,2379.0000&lt;/p&gt;
&lt;p&gt;&amp;quot;2012-06-20&amp;quot;,&amp;quot;MAC02TD34&amp;quot;,&amp;quot;03811111&amp;quot;,&amp;quot;MY TEXT WITH, WITH A COMMA.&amp;quot;,2379.0000&lt;/p&gt;
&lt;p&gt;&amp;quot;2012-06-20&amp;quot;,&amp;quot;MAC02TD34&amp;quot;,&amp;quot;03811112&amp;quot;,&amp;quot;MY TEXT WITH, WITH A COMMA.&amp;quot;,2379.0000&lt;/p&gt;
&lt;p&gt;Command&lt;/p&gt;
&lt;p&gt;(Get-Content myFile.txt) -match &amp;#39;&amp;quot;03811111&amp;quot;&amp;#39; -replace &amp;#39;[A-Z],&amp;#39;, &amp;#39;&amp;#39; -replace &amp;#39;&amp;quot;&amp;#39;, &amp;#39;&amp;#39; &amp;gt; newFile.txt&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3505222" width="1" height="1"&gt;</description></item></channel></rss>