<?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: Splunk Regex Help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602534#M209738</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243022"&gt;@kc_prane&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the shared sample is in one event, you could use the following regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "START.*messageDetails\&amp;gt;(?&amp;lt;Start_Date&amp;gt;\d+-\d+-\d+\s+\d+:\d+:\d+)\/.*END.*messageDetails\&amp;gt;(?&amp;lt;End_ate&amp;gt;\d+-\d+-\d+\s+\d+:\d+:\d+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/moeIVB/1" target="_blank"&gt;https://regex101.com/r/moeIVB/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If instead you have two events, you can separate the above regex in two regexes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2022 06:31:22 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-06-21T06:31:22Z</dc:date>
    <item>
      <title>Help with Splunk Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602500#M209723</link>
      <description>&lt;P&gt;Hi Team -&amp;nbsp; Need your expertise in Regex.&lt;/P&gt;
&lt;P&gt;The below is the rawlog i need to extract the Date and time&amp;nbsp; the only unique is the WORD "START" &amp;amp; "END" goal is to find the response time between START and END in a Table format.&lt;/P&gt;
&lt;P&gt;Note: there are no space in the log&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;START&amp;lt;/enteringExiting&amp;gt;&amp;lt;logLevel&amp;gt;INFO&amp;lt;/logLevel&amp;gt;&amp;lt;messageType&amp;gt;LOG&amp;lt;/messageType&amp;gt;&amp;lt;applicationName&amp;gt;GstarSOA&amp;lt;/applicationName&amp;lt;programName&amp;gt;GstarRecipientService_MF&amp;lt;/programName&amp;gt;&amp;lt;functionName&amp;gt;GetRecipient&amp;lt;/functionName&amp;gt;&amp;lt;host&amp;gt;PerfNode0&amp;lt;/host&amp;gt;&amp;lt;messageDetails&amp;gt;2022-06-17 04:10:53/utility/logging"&amp;gt;&amp;lt;enteringExiting&amp;gt;END&amp;lt;/enteringExiting&amp;gt;&amp;lt;logLevel&amp;gt;INFO&amp;lt;/logLevel&amp;gt;&amp;lt;messageType&amp;gt;LOG&amp;lt;/messageType&amp;gt;&amp;lt;applicationName&amp;gt;GstarSOA&amp;lt;/applicationName&amp;gt;&amp;lt;programName&amp;gt;GstarRecipientService_MF&amp;lt;/programName&amp;lt;functionName&amp;gt;GetRecipient&amp;lt;/functionName&amp;gt;&amp;lt;host&amp;gt;PerfNode0&amp;lt;/host&amp;gt;&amp;lt;messageDetails&amp;gt;2022-06-17 04:10:53&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 21 Jun 2022 23:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602500#M209723</guid>
      <dc:creator>kc_prane</dc:creator>
      <dc:date>2022-06-21T23:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602512#M209729</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243022"&gt;@kc_prane&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;Would you give me an example of your expected result ?&lt;BR /&gt;how do you calculate response time between start and end ? with&amp;nbsp;&lt;SPAN&gt;messageDetails?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 05:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602512#M209729</guid>
      <dc:creator>marysan</dc:creator>
      <dc:date>2022-06-21T05:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602534#M209738</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243022"&gt;@kc_prane&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the shared sample is in one event, you could use the following regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "START.*messageDetails\&amp;gt;(?&amp;lt;Start_Date&amp;gt;\d+-\d+-\d+\s+\d+:\d+:\d+)\/.*END.*messageDetails\&amp;gt;(?&amp;lt;End_ate&amp;gt;\d+-\d+-\d+\s+\d+:\d+:\d+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/moeIVB/1" target="_blank"&gt;https://regex101.com/r/moeIVB/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If instead you have two events, you can separate the above regex in two regexes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 06:31:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602534#M209738</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-21T06:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602654#M209769</link>
      <description>&lt;P&gt;Thanks Gcusello !&lt;/P&gt;&lt;P&gt;i modifed your solutiion it worked.&lt;/P&gt;&lt;P&gt;| rex "START.*messageDetails\&amp;gt;(?&amp;lt;Start_Date&amp;gt;\d+\-\d+\-\d+\s+\d+\:\d+\:\d+)" | rex "END.*messageDetails\&amp;gt;(?&amp;lt;End_Date&amp;gt;\d+\-\d+\-\d+\s+\d+\:\d+\:\d+)"&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 14:51:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602654#M209769</guid>
      <dc:creator>kc_prane</dc:creator>
      <dc:date>2022-06-21T14:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602659#M209772</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243022"&gt;@kc_prane&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 15:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602659#M209772</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-21T15:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602667#M209777</link>
      <description>&lt;P&gt;Hi @gcucello&lt;/P&gt;&lt;P&gt;Can you also help me how to seperate the date and time in the regex. Cause i wanted to find the difference between Start_time and End_time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex "START.*messageDetails\&amp;gt;(?&amp;lt;Start_Date&amp;gt;\d+\-\d+\-\d+\s+\d+\:\d+\:\d+)"&lt;/P&gt;&lt;P&gt;My results :&amp;nbsp;&lt;A href="https://shc.tenncare.splunkcloudgc.com/en-US/app/search/search?q=search%20index%3D*iib%20%22tag%3A%3Ahost%22%3DPERF%20sourcetype%3D%22IIB%3Aevent%22%20%20%221000000134%22%20%20%7C%20rex%20%22START.*messageDetails%5C%3E(%3F%3CStart_Date%3E%5Cd%2B%5C-%5Cd%2B%5C-%5Cd%2B%5Cs%2B%5Cd%2B%5C%3A%5Cd%2B%5C%3A%5Cd%2B)%22%20%7C%20rex%20%22END.*messageDetails%5C%3E(%3F%3CEnd_Date%3E%5Cd%2B%5C-%5Cd%2B%5C-%5Cd%2B%5Cs%2B%5Cd%2B%5C%3A%5Cd%2B%5C%3A%5Cd%2B)%22&amp;amp;display.page.search.mode=verbose&amp;amp;dispatch.sample_ratio=1&amp;amp;workload_pool=standard_perf&amp;amp;earliest=-24h%40h&amp;amp;latest=now&amp;amp;sid=1655822905.650608_FDE91D71-E0F4-4923-BAAD-A444C1036CE9#" target="_blank" rel="noopener"&gt;2022-06-17 03:49:46&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 15:36:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602667#M209777</guid>
      <dc:creator>kc_prane</dc:creator>
      <dc:date>2022-06-21T15:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602714#M209786</link>
      <description>&lt;P&gt;Hi Marysan - Thanks for the reply, i got the solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex "START.*messageDetails\&amp;gt;\d+\-\d+\-\d+\s+(?&amp;lt;Start_Time&amp;gt;\d+\:\d+\:\d+)" | rex "END.*messageDetails\&amp;gt;\d+\-\d+\-\d+\s+(?&amp;lt;End_Time&amp;gt;\d+\:\d+\:\d+)"&lt;BR /&gt;| eval ST = Strptime(Start_Time, "%H:%M:%S.%3N")&lt;BR /&gt;| eval ET = Strptime(End_Time, "%H:%M:%S.%3N")&lt;BR /&gt;| eval ResponseTime = tostring((ET -ST), "duration")&lt;BR /&gt;| table _time host tag::host Start_Time End_Time ResponseTime&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 21:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602714#M209786</guid>
      <dc:creator>kc_prane</dc:creator>
      <dc:date>2022-06-21T21:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602715#M209787</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi @gcucello -&amp;nbsp; No worries I got the solution, thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;| rex "START.*messageDetails\&amp;gt;\d+\-\d+\-\d+\s+(?&amp;lt;Start_Time&amp;gt;\d+\:\d+\:\d+)" | rex "END.*messageDetails\&amp;gt;\d+\-\d+\-\d+\s+(?&amp;lt;End_Time&amp;gt;\d+\:\d+\:\d+)"&lt;BR /&gt;| eval ST = Strptime(Start_Time, "%H:%M:%S.%3N")&lt;BR /&gt;| eval ET = Strptime(End_Time, "%H:%M:%S.%3N")&lt;BR /&gt;| eval ResponseTime = tostring((ET -ST), "duration")&lt;BR /&gt;| table _time host tag::host Start_Time End_Time ResponseTime&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 21:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-Splunk-Regex/m-p/602715#M209787</guid>
      <dc:creator>kc_prane</dc:creator>
      <dc:date>2022-06-21T21:33:41Z</dc:date>
    </item>
  </channel>
</rss>

