<?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 How to write regex for search or index time field extractions? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181598#M52332</link>
    <description>&lt;P&gt;Im trying to get search time field extractions (or index time) on the following log format:&lt;/P&gt;

&lt;P&gt;2014-06-11T09:32:45.545-07:00 - INFO&lt;BR /&gt;
RequestType:SFPR&lt;BR /&gt;
UniqueRequestGUID:0e160f29-d75b-49dd-b966-4d93678d0590&lt;BR /&gt;
SessionGUID:826e14ab-df0f-41c8-b874-13d17dd0b655&lt;BR /&gt;
ProductType:PACKAGE&lt;BR /&gt;
TPID:6&lt;BR /&gt;
EPID:0&lt;BR /&gt;
PGPR_PIID:f4669df2-e9af-429c-8b9d-b1b4aa136d9e-0&lt;BR /&gt;
PGPR_ConnOpen:1&lt;BR /&gt;
PGPR_Ser:2&lt;BR /&gt;
PGPR_RequestDuration:25&lt;BR /&gt;
PGPR_Des:2&lt;BR /&gt;
RequestDuration:30&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:20:20 GMT</pubDate>
    <dc:creator>smudge797</dc:creator>
    <dc:date>2020-09-28T17:20:20Z</dc:date>
    <item>
      <title>How to write regex for search or index time field extractions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181598#M52332</link>
      <description>&lt;P&gt;Im trying to get search time field extractions (or index time) on the following log format:&lt;/P&gt;

&lt;P&gt;2014-06-11T09:32:45.545-07:00 - INFO&lt;BR /&gt;
RequestType:SFPR&lt;BR /&gt;
UniqueRequestGUID:0e160f29-d75b-49dd-b966-4d93678d0590&lt;BR /&gt;
SessionGUID:826e14ab-df0f-41c8-b874-13d17dd0b655&lt;BR /&gt;
ProductType:PACKAGE&lt;BR /&gt;
TPID:6&lt;BR /&gt;
EPID:0&lt;BR /&gt;
PGPR_PIID:f4669df2-e9af-429c-8b9d-b1b4aa136d9e-0&lt;BR /&gt;
PGPR_ConnOpen:1&lt;BR /&gt;
PGPR_Ser:2&lt;BR /&gt;
PGPR_RequestDuration:25&lt;BR /&gt;
PGPR_Des:2&lt;BR /&gt;
RequestDuration:30&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181598#M52332</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2020-09-28T17:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex for search or index time field extractions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181599#M52333</link>
      <description>&lt;P&gt;Seems like fairly straightforward key-value extraction, try this:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
REPORT-kv = key_colon_value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[key_colon_value]
REGEX = ^(?&amp;lt;_KEY_1&amp;gt;\w+):(?&amp;lt;_VAL_1&amp;gt;.*)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure my use of start- and end-of-line anchors works correctly without specifying any flags such as &lt;CODE&gt;(?m)&lt;/CODE&gt; or &lt;CODE&gt;(?s)&lt;/CODE&gt;, I frequently mix those up &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 13:33:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181599#M52333</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-14T13:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex for search or index time field extractions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181600#M52334</link>
      <description>&lt;P&gt;Thanks Martin..&lt;BR /&gt;
interesting, it does not appear to be working.  Can you expand on the anchor points?&lt;BR /&gt;
Maybe i am mixing them up!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 15:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181600#M52334</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2014-08-14T15:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex for search or index time field extractions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181601#M52335</link>
      <description>&lt;P&gt;Do i not need something extra to have the : appear as a =&lt;BR /&gt;
So ProductType:PACKAGE would be ProductType=PACKAGE&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 15:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181601#M52335</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2014-08-14T15:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex for search or index time field extractions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181602#M52336</link>
      <description>&lt;P&gt;Try this as transform REGEX.&lt;/P&gt;

&lt;P&gt;\s*(?&amp;lt;&lt;EM&gt;KEY_1&amp;gt;[a-zA-Z\&lt;/EM&gt;]+):(?&amp;lt;_VAL_1&amp;gt;[^\s]*)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-for-search-or-index-time-field-extractions/m-p/181602#M52336</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T17:20:29Z</dc:date>
    </item>
  </channel>
</rss>

