<?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: How to create a regex for unmapped queries? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457795#M129289</link>
    <description>&lt;P&gt;Yes. I understand Naresh. Thanks for your answer. I accept your answer as well.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 07:09:42 GMT</pubDate>
    <dc:creator>Nidd</dc:creator>
    <dc:date>2019-08-22T07:09:42Z</dc:date>
    <item>
      <title>How to create a regex for unmapped queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457792#M129286</link>
      <description>&lt;P&gt;I have Splunk logs like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;class,method,user,transactionType,,428856645467856301,1073258159,50213,5,2019-08-21 23:17:58.562,2019-08-21 23:17:58.994,432,,,,4,45170632,19634442,,,,159,52297220,801767,,,,,,,b4a954df-8c77-4a30-b4ac-68ec9afe9a48,,,,TransactionType=transactionType|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There would be many many logs of this format.&lt;/P&gt;

&lt;P&gt;I now need to extract a couple of timestamps and populate in a table. Eg: '2019-08-21 23:17:58.562' and '2019-08-21 23:17:58.994,432' from the above log and display as:&lt;BR /&gt;
    -------------------------------------------------------------------&lt;BR /&gt;
    StartTime                                        EndTime&lt;BR /&gt;
    -------------------------------------------------------------------&lt;BR /&gt;
    2019-08-21 23:17:58.562     2019-08-21 23:17:58.994&lt;BR /&gt;
    -------------------------------------------------------------------&lt;/P&gt;

&lt;P&gt;Can someone please help?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 06:48:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457792#M129286</guid>
      <dc:creator>Nidd</dc:creator>
      <dc:date>2019-08-22T06:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regex for unmapped queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457793#M129287</link>
      <description>&lt;P&gt;Try this: Keep in mind that this only helps if the time placements are at the same position for all your log content. If your input is of csv format with all headers, extraction would have been easy&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults
|eval _raw="class,method,user,transactionType,,428856645467856301,1073258159,50213,5,2019-08-21 23:17:58.562,2019-08-21 23:17:58.994,432,,,,4,45170632,19634442,,,,159,52297220,801767,,,,,,,b4a954df-8c77-4a30-b4ac-68ec9afe9a48,,,,TransactionType=transactionType" 
|eval fields=split(_raw,",") 
| eval Start_time=mvindex(fields,9), End_time=mvindex(fields,10) 
| table Start_time End_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Aug 2019 07:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457793#M129287</guid>
      <dc:creator>nareshinsvu</dc:creator>
      <dc:date>2019-08-22T07:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regex for unmapped queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457794#M129288</link>
      <description>&lt;P&gt;Found this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;mySearch&amp;gt; | rex "^(?:(?&amp;lt;TransactionStartTime&amp;gt;[^,]*),){10}" | rex "^(?:(?&amp;lt;TransactionEndTime&amp;gt;[^,]*),){11}" | table TransactionStartTime, TransactionEndTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Aug 2019 07:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457794#M129288</guid>
      <dc:creator>Nidd</dc:creator>
      <dc:date>2019-08-22T07:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regex for unmapped queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457795#M129289</link>
      <description>&lt;P&gt;Yes. I understand Naresh. Thanks for your answer. I accept your answer as well.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 07:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regex-for-unmapped-queries/m-p/457795#M129289</guid>
      <dc:creator>Nidd</dc:creator>
      <dc:date>2019-08-22T07:09:42Z</dc:date>
    </item>
  </channel>
</rss>

