<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Transform to remove the first column of a CSV if it matches a set of criteria? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76028#M19203</link>
    <description>&lt;P&gt;though when i put what you provided into &lt;A href="http://regexlib.com/RETester.aspx"&gt;http://regexlib.com/RETester.aspx&lt;/A&gt;&lt;BR /&gt;
as:   ^[^,]:[^,],(.*)&lt;BR /&gt;
with data as:  something:anything,stuff1,stuff2,stuff3:stuff4,stuff5&lt;/P&gt;

&lt;P&gt;nothing comes back.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Oct 2012 18:26:39 GMT</pubDate>
    <dc:creator>dennywebb</dc:creator>
    <dc:date>2012-10-01T18:26:39Z</dc:date>
    <item>
      <title>Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76025#M19200</link>
      <description>&lt;P&gt;i have logs coming in as CSV files, but sometimes junk data is truncated on the front by the system generating them, sometimes not.  they are otherwise identical.  i have no control on this system.&lt;/P&gt;

&lt;P&gt;the upside is the junk is always of a certain pattern:&lt;BR /&gt;
blah:blah,gooddata,gooddata,gooddata,gooddata,gooddata&lt;BR /&gt;
versus the clean ones which are just:&lt;BR /&gt;
gooddata,gooddata,gooddata,gooddata,gooddata&lt;/P&gt;

&lt;P&gt;how do i get a transform to drop that first column before indexing ONLY IF it has X:X as a value?&lt;/P&gt;

&lt;P&gt;been beating my head against this for 2 days... regex is not my strong point.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 11:28:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76025#M19200</guid>
      <dc:creator>dennywebb</dc:creator>
      <dc:date>2012-10-01T11:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76026#M19201</link>
      <description>&lt;P&gt;Well a regex that will match anything at the beginning of the line until the first comma, with a &lt;CODE&gt;:&lt;/CODE&gt; character in it would look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^[^,]+:[^,]+,
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2012 11:41:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76026#M19201</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-10-01T11:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76027#M19202</link>
      <description>&lt;P&gt;and then i would use the Dest_Key=_Raw in the transform stanza to replace the raw log with my newly cleaned one i presume?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76027#M19202</guid>
      <dc:creator>dennywebb</dc:creator>
      <dc:date>2020-09-28T12:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76028#M19203</link>
      <description>&lt;P&gt;though when i put what you provided into &lt;A href="http://regexlib.com/RETester.aspx"&gt;http://regexlib.com/RETester.aspx&lt;/A&gt;&lt;BR /&gt;
as:   ^[^,]:[^,],(.*)&lt;BR /&gt;
with data as:  something:anything,stuff1,stuff2,stuff3:stuff4,stuff5&lt;/P&gt;

&lt;P&gt;nothing comes back.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 18:26:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76028#M19203</guid>
      <dc:creator>dennywebb</dc:creator>
      <dc:date>2012-10-01T18:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76029#M19204</link>
      <description>&lt;P&gt;Sorry, forgot two &lt;CODE&gt;+&lt;/CODE&gt; signs in my regex. Editing my answer with a correct regex.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 18:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76029#M19204</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-10-01T18:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76030#M19205</link>
      <description>&lt;P&gt;you sir/mam, are the man/woman.  the end result:&lt;BR /&gt;
^([^,]+:[^,]+,)?(.*)&lt;BR /&gt;
works great.  i should be able to just feed $2 back into the raw for either type and always have the same result.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 19:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76030#M19205</guid>
      <dc:creator>dennywebb</dc:creator>
      <dc:date>2012-10-01T19:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Transform to remove the first column of a CSV if it matches a set of criteria?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76031#M19206</link>
      <description>&lt;P&gt;an update, installed and working perfectly.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Oct 2012 15:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transform-to-remove-the-first-column-of-a-CSV-if-it-matches-a/m-p/76031#M19206</guid>
      <dc:creator>dennywebb</dc:creator>
      <dc:date>2012-10-06T15:30:51Z</dc:date>
    </item>
  </channel>
</rss>

