<?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: Regex : Extract text after occurrence of a specific recurring character in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396418#M115107</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your base search&amp;gt; | rex field=_raw ".*\]\s+(?&amp;lt;field&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Jun 2018 13:25:24 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-06-19T13:25:24Z</dc:date>
    <item>
      <title>Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396417#M115106</link>
      <description>&lt;P&gt;I have events like this - &lt;BR /&gt;
[2018-03-30 13:45:51,515] [[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [INFO] [CustomerImpl] [6fbfb1ab-c947-49e9-964d-761390208a3b] Returning getCustomer for customer&lt;BR /&gt;
 and&lt;BR /&gt;
[2018-03-30 13:45:51,515] [[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [INFO] [CometHeaderInboundRef] [] Read from inbound Header - UUID=6fbfb1ab-c947-49e9-964d-761390208a3b Username=maxuser&lt;/P&gt;

&lt;P&gt;Now, ask is to get everything using regex after the last square bracket till end of event, so first event should return-  Returning getCustomer for customer and second event should return - Read from inbound Header - UUID=6fbfb1ab-c947-49e9-964d-761390208a3b Username=maxuser&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 13:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396417#M115106</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-19T13:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396418#M115107</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your base search&amp;gt; | rex field=_raw ".*\]\s+(?&amp;lt;field&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jun 2018 13:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396418#M115107</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-06-19T13:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396419#M115108</link>
      <description>&lt;P&gt;Hi - Yes I tried this before. It looked simple enough to me at the beginning , just escape everything before the last square bracket and fetch till event end. Ideally this should have worked in a jiffy, but I am receiving empty results.&lt;BR /&gt;
Point to note - When I manually copied these lines into a notepad (to check if my rgex is correct) and ran our same query above , I got the results. This event set however is  a live log sent by a forwarder and it does not work on the live data.&lt;BR /&gt;
If our regex is correct, how come it works as a notepad source and not live logging? Is data source/way it is being indexed through forwarder an issue ? I am slightly worried&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 13:34:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396419#M115108</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-19T13:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396420#M115109</link>
      <description>&lt;P&gt;try this&lt;BR /&gt;
&lt;CODE&gt;&amp;lt;your base search&amp;gt; | rex field=_raw ".*\]\s*(?&amp;lt;some_field&amp;gt;[^\n\r]+)"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 13:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396420#M115109</guid>
      <dc:creator>soumyasaha25</dc:creator>
      <dc:date>2018-06-19T13:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396421#M115110</link>
      <description>&lt;P&gt;Hi - once again, same result as above, meaning If i manually use this as a notepad data source , i receive the correct results but not from the live logs....&lt;BR /&gt;
I am not that good in rgex, as per me our first regex above should have worked..what is the difference between that regex and yours?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 13:53:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396421#M115110</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-19T13:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396422#M115111</link>
      <description>&lt;P&gt;can you post the query that you are running in Splunk (if required please mask sensitive data).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 15:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396422#M115111</guid>
      <dc:creator>soumyasaha25</dc:creator>
      <dc:date>2018-06-19T15:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regex : Extract text after occurrence of a specific recurring character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396423#M115112</link>
      <description>&lt;P&gt;Hi, there was an issue with the data indexing. I don't know what it was but there were multiple complaints from many users , some were not able to view the auto extracted fields as well. Yesterday, we re-indexed the whole data. Now, both the regexes work. I am going to accept  @mayurr98 's answer and up vote @soumyasaha25 's comment.&lt;BR /&gt;
I do not think there was anything wrong in our approach, meanwhile - the curious case of the data indexing is being investigated by the splunk admin team &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 08:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Extract-text-after-occurrence-of-a-specific-recurring/m-p/396423#M115112</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-23T08:44:42Z</dc:date>
    </item>
  </channel>
</rss>

