<?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: Parsing of events using regex in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670033#M112347</link>
    <description>&lt;P&gt;Try it one line at a time and see where it fails&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 13:57:36 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-11-28T13:57:36Z</dc:date>
    <item>
      <title>Parsing of events using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670021#M112341</link>
      <description>&lt;P&gt;Hello community,&lt;BR /&gt;&lt;BR /&gt;Below is my sample log file I want to extract each individual piece of event(starting from @ID to REMARK) from the log file. I tried to achieve this by using following regex: (^@ID[\s\S]*?REMARK.*$)&lt;BR /&gt;This regex is taking the whole log file as single event. Attaching the snapshot below.&amp;nbsp;&lt;BR /&gt;Also tried to alter the props.conf by using the same regex:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;props.conf
[t24]
SHOULD_LINEMERGE=False
LINE_BREAKER=(^@ID[\s\S]*?REMARK.*$)
NO_BINARY_CHECK=true
disabled=false
INDEXED_EXTRACTIONS = csv&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;#27;[H&amp;#27;[2JLIST F.PROTOCOL @ID PROTOCOL.ID PROCESS.DATE TIME.MSECS K.USER APPLICATION LEVEL.FUNCTION ID REMARK                                                                         PAGE    1 11:34:02  23 NOV 2023

@ID............ 202309260081340532.21                                                                                                                                                                           
@ID............ 202309260081340532.21                                                                                                                                                                           
PROTOCOL.ID.... 202309260081340532.21                                                                                                                                                                           
PROCESS.DATE... 20230926                                                                                                                                                                                        
TIME.MSECS..... 11:15:32:934                                                                                                                                                                                    
K.USER......... INPUTTER                                                                                                                                                                                        
APPLICATION.... AC.INWARD.ENTRY                                                                                                                                                                                 
LEVEL.FUNCTION. 1                                                                                                                                                                                               
ID.............                                                                                                                                                                                                 
REMARK......... ENQUIRY - AC.INTERFACE.REPORT                                                                                                                                                                   

@ID............ 202309260081340523.16                                                                                                                                                                           
@ID............ 202309260081340523.16                                                                                                                                                                           
PROTOCOL.ID.... 202309260081340523.16                                                                                                                                                                           
PROCESS.DATE... 20230926                                                                                                                                                                                        
TIME.MSECS..... 11:15:23:649                                                                                                                                                                                    
K.USER......... INPUTTER                                                                                                                                                                                        
APPLICATION.... AC.INWARD.ENTRY                                                                                                                                                                                 
LEVEL.FUNCTION. 1                                                                                                                                                                                               
ID.............                                                                                                                                                                                                 
REMARK......... ENQUIRY - AC.INTERFACE.REPORT &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attaching the screenshot of the data which I'm getting on Splunk by using the regex mentioned above.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mukhan1_3-1701175303903.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28271iC8EF3BEF7A22E00C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mukhan1_3-1701175303903.png" alt="mukhan1_3-1701175303903.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also attaching the snapshot of regex result which i have checked earlier online.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mukhan1_2-1701175257291.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28270iC61D04C054CC3E23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mukhan1_2-1701175257291.png" alt="mukhan1_2-1701175257291.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want my data to be shown in table form following is the example snapshot of how I want my data to be appear on Splunk.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mukhan1_4-1701175806186.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28272iCDE9C4BFEBE98BC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mukhan1_4-1701175806186.jpeg" alt="mukhan1_4-1701175806186.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670021#M112341</guid>
      <dc:creator>mukhan1</dc:creator>
      <dc:date>2023-11-28T13:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing of events using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670028#M112343</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="&amp;#27;[H&amp;#27;[2JLIST F.PROTOCOL @ID PROTOCOL.ID PROCESS.DATE TIME.MSECS K.USER APPLICATION LEVEL.FUNCTION ID REMARK                                                                         PAGE    1 11:34:02  23 NOV 2023

@ID............ 202309260081340532.2
@ID............ 202309260081340532.21
PROTOCOL.ID.... 202309260081340532.21
PROCESS.DATE... 20230926
TIME.MSECS..... 11:15:32:934
K.USER......... INPUTTER
APPLICATION.... AC.INWARD.ENTRY
LEVEL.FUNCTION. 1
ID............. 
REMARK......... ENQUIRY - AC.INTERFACE.REPORT

@ID............ 202309260081340523.16
@ID............ 202309260081340523.16
PROTOCOL.ID.... 202309260081340523.16
PROCESS.DATE... 20230926
TIME.MSECS..... 11:15:23:649
K.USER......... INPUTTER
APPLICATION.... AC.INWARD.ENTRY
LEVEL.FUNCTION. 1
ID............. 
REMARK......... ENQUIRY - AC.INTERFACE.REPORT"
``` The lines above set up sample data in line with your example ```
| rex max_match=0 "(?ms)(?&amp;lt;event&amp;gt;^\@ID.*?REMARK.*?$)"
| mvexpand event
| rex max_match=0 field=event "(?m)(?&amp;lt;namevalue&amp;gt;.+\.+\s.*$)"
| streamstats count as row
| mvexpand namevalue
| rex field=namevalue "(?&amp;lt;name&amp;gt;[^\s]+(?&amp;lt;!\.))\.*?\s(?&amp;lt;value&amp;gt;.*$)"
| eval {name}=value
| fields - name value namevalue event
| stats values(*) as * by row
| fields - row&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670028#M112343</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-28T13:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing of events using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670031#M112345</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Thanks for your response. I was trying to add the search you have provided but failed to get desired value, can you please elaborate further how to use this solution you provided.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:44:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670031#M112345</guid>
      <dc:creator>mukhan1</dc:creator>
      <dc:date>2023-11-28T13:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing of events using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670033#M112347</link>
      <description>&lt;P&gt;Try it one line at a time and see where it fails&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670033#M112347</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-28T13:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing of events using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670036#M112350</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;,&lt;BR /&gt;Thanks for the response the provided solution is working however if I edit this file and add more data will this search work same as it is working now? This file keeps getting updated after some time,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670036#M112350</guid>
      <dc:creator>mukhan1</dc:creator>
      <dc:date>2023-11-28T14:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing of events using regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670048#M112352</link>
      <description>&lt;P&gt;It is not failing since we haven’t define any sourcetype or source in search, we hardcoded the payload, however it is working properly giving the exact same headings required. The problem is how it will extract this information from given sourcetype or source.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parsing-of-events-using-regex/m-p/670048#M112352</guid>
      <dc:creator>mukhan1</dc:creator>
      <dc:date>2023-11-28T15:59:21Z</dc:date>
    </item>
  </channel>
</rss>

