<?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: Need Help with Time Prefix and &amp;quot;|&amp;quot; character in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97784#M20386</link>
    <description>&lt;P&gt;This is the one that eventually worked.  I didn't test the others too hard.  This one looked elegant.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2013 13:07:36 GMT</pubDate>
    <dc:creator>wbfoxii</dc:creator>
    <dc:date>2013-10-15T13:07:36Z</dc:date>
    <item>
      <title>Need Help with Time Prefix and "|" character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97780#M20382</link>
      <description>&lt;P&gt;I've got data that looks like this:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
YCTC3|YCTC3|A277537|20131013|225102|316739|E|001|TP0|THPNBAV05|10.124.130.71|||||||PAR|A|0000119501|00|||&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Date is the fourth column, and time is the fifth.  Got any ideas about how to get TIME_PREFIX, TIME_FORMAT and MAX_TIME_LOOKAHEAD to get this right?&lt;/P&gt;

&lt;P&gt;My latest try is:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
TIME_PREFIX = ^[^|]&lt;EM&gt;|[^|]&lt;/EM&gt;|[^|]*|&lt;BR /&gt;
TIME_FORMAT = %Y%m%d|%H%M%S&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 20&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97780#M20382</guid>
      <dc:creator>wbfoxii</dc:creator>
      <dc:date>2020-09-28T14:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Time Prefix and "|" character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97781#M20383</link>
      <description>&lt;P&gt;| has special meaning in a regex, you'll have to escape it with a \.&lt;/P&gt;

&lt;P&gt;TIME_PREFIX= ^[^\|]\|{3}&lt;/P&gt;

&lt;P&gt;There are three groups of "non-pipe characters followed by a pipe".&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 20:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97781#M20383</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-10-14T20:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Time Prefix and "|" character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97782#M20384</link>
      <description>&lt;P&gt;I think the only issue is your TIME_PREFIX.  The regex you have only matches a single non-pipe character between each pipe.  For what you have, you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = ^[^\|]+\|[^\|]+\|[^\|]+\|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then the rest should work as intended.&lt;/P&gt;

&lt;P&gt;(Replace + with * if any of the preceeding fields might be empty.  |||20131013|...)&lt;/P&gt;

&lt;P&gt;EDIT:  Also need to escape the pipes, as sowings mentioned. &lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 20:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97782#M20384</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2013-10-14T20:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Time Prefix and "|" character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97783#M20385</link>
      <description>&lt;P&gt;Good call, I missed the "only one char" thing.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 20:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97783#M20385</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-10-14T20:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Time Prefix and "|" character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97784#M20386</link>
      <description>&lt;P&gt;This is the one that eventually worked.  I didn't test the others too hard.  This one looked elegant.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:07:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97784#M20386</guid>
      <dc:creator>wbfoxii</dc:creator>
      <dc:date>2013-10-15T13:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Time Prefix and "|" character</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97785#M20387</link>
      <description>&lt;P&gt;I think the {3} only applies to the previous token, so you'd have to group before using it for it to apply to the whole pattern.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?:[^\|]+\|){3}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Oct 2013 21:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-Help-with-Time-Prefix-and-quot-quot-character/m-p/97785#M20387</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2013-10-20T21:48:31Z</dc:date>
    </item>
  </channel>
</rss>

