<?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: Unable to get the correct rex to extract fields from string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591349#M205864</link>
    <description>&lt;P&gt;No, that did not really work for me.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk-rex-no-results.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18828iCABC054886277B9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk-rex-no-results.png" alt="splunk-rex-no-results.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried the below and with it, I am able to get the start &amp;amp; end times but not the count.&lt;/P&gt;&lt;P&gt;rex "StartTime=(?&amp;lt;startTime&amp;gt;.*) EndTime=(?&amp;lt;endTime&amp;gt;.*) Count=(?&amp;lt;Count&amp;gt;\d+)"&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 20:09:34 GMT</pubDate>
    <dc:creator>j2menanda</dc:creator>
    <dc:date>2022-03-29T20:09:34Z</dc:date>
    <item>
      <title>How to get the correct rex to extract fields from string?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591322#M205857</link>
      <description>&lt;P class="lia-align-justify"&gt;Hi, I have below string and I am trying to get StartTime, EndTime and Count to be displayed in the dashboard.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;"Non-Match - Window Event not matches with events Count with StartTime=2020-02-03T11:00:00.000Z EndTime=2020-02-03T11:00:00.000Z Count=100\"&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;I tried multiple rex formats but couldn't succeed. Can I get some help with this please?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591322#M205857</guid>
      <dc:creator>j2menanda</dc:creator>
      <dc:date>2022-03-29T20:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591343#M205862</link>
      <description>&lt;LI-CODE lang="markup"&gt;StartTime=(?&amp;lt;StartTime&amp;gt;\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d\.\d+Z)\sEndTime=(?&amp;lt;EndTime&amp;gt;\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d\.\d+Z)\sCount=(?&amp;lt;Count&amp;gt;\d+)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Mar 2022 19:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591343#M205862</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-29T19:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591349#M205864</link>
      <description>&lt;P&gt;No, that did not really work for me.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk-rex-no-results.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18828iCABC054886277B9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk-rex-no-results.png" alt="splunk-rex-no-results.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried the below and with it, I am able to get the start &amp;amp; end times but not the count.&lt;/P&gt;&lt;P&gt;rex "StartTime=(?&amp;lt;startTime&amp;gt;.*) EndTime=(?&amp;lt;endTime&amp;gt;.*) Count=(?&amp;lt;Count&amp;gt;\d+)"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:09:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591349#M205864</guid>
      <dc:creator>j2menanda</dc:creator>
      <dc:date>2022-03-29T20:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591351#M205865</link>
      <description>&lt;P&gt;Try them as separate rex commands&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "StartTime=(?&amp;lt;StartTime&amp;gt;\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d\.\d+Z)"
| rex "EndTime=(?&amp;lt;EndTime&amp;gt;\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d\.\d+Z)"
| rex "Count=(?&amp;lt;Count&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:18:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591351#M205865</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-29T20:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591352#M205866</link>
      <description>&lt;P&gt;Thanks for that. It is as good as the below one:&lt;/P&gt;&lt;P&gt;| rex "StartTime=(?&amp;lt;startTime&amp;gt;.*) EndTime=(?&amp;lt;endTime&amp;gt;.*) Count=(?&amp;lt;Count&amp;gt;[^ ]+)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;except for it doesn't get the 'Count'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my log:&lt;/P&gt;&lt;P&gt;{"timestamp":"2022-03-25T15:16:49.066+00:00","logger":"config.SomeConfig","message":"FID=SomeConfig APPL= RQID= TEXT=\"Recon :: Non-Match - Window Event not matches with Transaction Store Count with StartTime=2020-02-03T11:00:00.000Z EndTime=2020-02-03T11:00:00.000Z Count=100\" STRT=1648221409","level":"INFO","application-id":"103299","application-name":"ingest"}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 20:24:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591352#M205866</guid>
      <dc:creator>j2menanda</dc:creator>
      <dc:date>2022-03-29T20:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591421#M205888</link>
      <description>&lt;P&gt;In that &amp;nbsp;case you would have a field named 'message'. &amp;nbsp;Consider&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Extract#extract" target="_blank" rel="noopener"&gt;extract&lt;/A&gt;&amp;nbsp;aka kv. &amp;nbsp;For example,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _raw AS temp, message AS _raw
| kv pairdelim=" "
| rename temp AS _raw ``` only if you still need original _raw ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your sample data gives&lt;/P&gt;&lt;TABLE width="1200px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="54.90625px"&gt;Count&lt;/TD&gt;&lt;TD width="145.375px"&gt;EndTime&lt;/TD&gt;&lt;TD width="99.53125px"&gt;FID&lt;/TD&gt;&lt;TD width="107px"&gt;STRT&lt;/TD&gt;&lt;TD width="145.375px"&gt;StartTime&lt;/TD&gt;&lt;TD width="145.375px"&gt;TEXT&lt;/TD&gt;&lt;TD width="68.609375px"&gt;application-id&lt;/TD&gt;&lt;TD width="54.75px"&gt;application-name&lt;/TD&gt;&lt;TD width="46.328125px"&gt;level&lt;/TD&gt;&lt;TD width="147.390625px"&gt;logger&lt;/TD&gt;&lt;TD width="186.453125px"&gt;timestamp&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="54.90625px"&gt;100&lt;/TD&gt;&lt;TD width="145.375px"&gt;2020-02-03T11:00:00.000Z&lt;/TD&gt;&lt;TD width="99.53125px"&gt;SomeConfig&lt;/TD&gt;&lt;TD width="107px"&gt;1648221409&lt;/TD&gt;&lt;TD width="145.375px"&gt;2020-02-03T11:00:00.000Z&lt;/TD&gt;&lt;TD width="145.375px"&gt;Recon :: Non-Match - Window Event not matches with Transaction Store Count with StartTime=2020-02-03T11:00:00.000Z EndTime=2020-02-03T11:00:00.000Z Count=100&lt;/TD&gt;&lt;TD width="68.609375px"&gt;103299&lt;/TD&gt;&lt;TD width="54.75px"&gt;ingest&lt;/TD&gt;&lt;TD width="46.328125px"&gt;INFO&lt;/TD&gt;&lt;TD width="147.390625px"&gt;config.SomeConfig&lt;/TD&gt;&lt;TD width="186.453125px"&gt;2022-03-25T15:16:49.066+00:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 07:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591421#M205888</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-30T07:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591526#M205921</link>
      <description>&lt;P&gt;Thank you. Used the below as is.&lt;/P&gt;&lt;P&gt;| rename _raw AS temp, message AS _raw&lt;BR /&gt;| kv pairdelim=" "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk-rex-no-results.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18856iA68B93B3FB8C535C/image-size/large?v=v2&amp;amp;px=999" role="button" title="splunk-rex-no-results.png" alt="splunk-rex-no-results.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The 'Text' is one single string that includes start time and end time along with the count, and the TEXT itself is part of the 'message' field.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:24:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591526#M205921</guid>
      <dc:creator>j2menanda</dc:creator>
      <dc:date>2022-03-30T14:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591556#M205930</link>
      <description>&lt;P&gt;| rename _raw AS temp, message AS _raw&lt;BR /&gt;| extract pairdelim="?&amp;amp;" kvdelim="="&lt;BR /&gt;| table StartTime, EndTime, Count&lt;/P&gt;&lt;P&gt;The above query worked for me when I ran in browser. However, I am not able to use this in the dashboard. It says invalid character entity. For that matter, any other query that uses a regex is showing error in the xml for dashboard saying unsatisfied close tag or something of that kind.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 15:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591556#M205930</guid>
      <dc:creator>j2menanda</dc:creator>
      <dc:date>2022-03-30T15:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the correct rex to extract fields from string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591566#M205934</link>
      <description>&lt;P&gt;Not sure why you need pairdelim="?&amp;amp;" - the sample data reads like white space to me. &amp;nbsp;But if the ampersand (&amp;amp;) is needed in Simple XML, you must substitute with "&lt;FONT face="courier new,courier"&gt;&amp;amp;amp;&lt;/FONT&gt;" (no quotes) if you use source editor. &amp;nbsp;In visual editor you must use "&lt;FONT face="courier new,courier"&gt;&amp;amp;&lt;/FONT&gt;".&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:20:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-correct-rex-to-extract-fields-from-string/m-p/591566#M205934</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-03-30T16:20:41Z</dc:date>
    </item>
  </channel>
</rss>

