<?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 to find Multi Line pattern in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702048#M238086</link>
    <description>&lt;P&gt;Just to be clear, are you saying that your sample data (as shown) has been ingested as a single event and that there are other lines in the event which are unrelated or at least you want to ignore?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2024 11:07:00 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-10-16T11:07:00Z</dc:date>
    <item>
      <title>Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702009#M238080</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having some problem to understand How to fetch multiline pattern in a single event.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have logfile in which I am searching this pattern which is scattered in multiple lines,&lt;BR /&gt;123456789102BP Tank: Bat from Surface = #07789*K00C0**************************************** 00003453534534534&lt;/P&gt;&lt;P&gt;****after Multiple Lines***&lt;BR /&gt;123456789107CSVSentinfo:L00Show your passport&lt;/P&gt;&lt;P&gt;****after Multiple Lines***&lt;/P&gt;&lt;P&gt;123456789110CSVSentinfo Data:z800&lt;BR /&gt;****after Multiple Lines***&lt;/P&gt;&lt;P&gt;123456789113CSVSentinfoToCollege:&lt;/P&gt;&lt;P&gt;****after Multiple Lines***&lt;/P&gt;&lt;P&gt;123456789117CSVSentinfoFromCollege:&lt;/P&gt;&lt;P&gt;****after Multiple Lines***&lt;/P&gt;&lt;P&gt;123456789120CSVSentinfo:G7006L&lt;/P&gt;&lt;P&gt;****after Multiple Lines***&lt;/P&gt;&lt;P&gt;123456789122CSVSentinfo:A0T0&lt;/P&gt;&lt;P&gt;****after Multiple Lines***&lt;/P&gt;&lt;P&gt;123456789124BP Tank: Bat to Surface L000passportAccepted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried below query to find all the occurrences but no luck&lt;BR /&gt;index=khisab_ustri&amp;nbsp; sourcetype=sosnmega&amp;nbsp; "*BP Tank: Bat from surface = *K00C0*" |dedup _time&lt;BR /&gt;|rex field=_raw "(?ms)(?&amp;lt;time_string&amp;gt;\d{12})BP Tank: Bat from Surface .*K00C0\d{21}(?&amp;lt;kmu_str&amp;gt;\d{2})*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;PC_sTime&amp;gt;\d{12})CSVSentinfo:L00Show your passport*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;CP_sTime&amp;gt;\d{12})CSVSentinfo Data:z800*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;MTB_sTime&amp;gt;\d{12})CSVSentinfoToCollege:*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;MFB_sTime&amp;gt;\d{12})CSVSentinfoFromCollege:*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;PR_sTime&amp;gt;\d{12})CSVSentinfo:G7006L*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;JR_sTime&amp;gt;\d{12})CSVSentinfo:A0T0*"&lt;BR /&gt;|rex field=_raw "(?&amp;lt;MR_sTime&amp;gt;\d{12})BP Tank: Bat to Surface =.+L000passportAccepted*"&lt;BR /&gt;|table (PC_sTime- time_string),(CP_sTime- PC_sTime),(MTB_sTime-CP_sTime),(MFB_sTime-MTB_sTime),(PR_sTime- MFB_sTime),(JR_sTime-PR_sTime),(MR_sTime-JR_sTime)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sample Data is&lt;BR /&gt;&lt;BR /&gt;Sample Data:&lt;BR /&gt;123456789102BP Tank: Bat from Surface = #07789*K00C0**************************************** 00003453534534534&lt;BR /&gt;123456789103UniverseToMachine\0a&amp;lt;Ladbrdige&amp;gt;\0a &amp;lt;SurfaceTake&amp;gt;GOP&amp;lt;/Ocnce&amp;gt;\0a &amp;lt;Final_Worl-ToDO&amp;gt;Firewallset&amp;lt;/KuluopToset&amp;gt;\0a&amp;lt;/&lt;BR /&gt;123456789105SetSurFacetoMost&amp;gt;7&amp;lt;/DecideTomove&amp;gt;\0a &amp;lt;TakeaKooch&amp;gt;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;lt;/SurfaceBggien&amp;gt;\0a &amp;lt;Closethe Work&amp;gt;0&amp;lt;/Csloethe Work&amp;gt;\0a&lt;BR /&gt;123456789107CSVSentinfo:L00Show your passport&lt;BR /&gt;123456789108BP Tank: Bat from Surface = close ticket&lt;BR /&gt;123456789109CSVSentinfo:Guide iunit&lt;BR /&gt;123456789110CSVSentinfo Data:z800&lt;BR /&gt;123456789111CSVGErt Infro"8900&lt;BR /&gt;123456789112CSGFajsh:984&lt;BR /&gt;123456789113CSVSentinfoToCollege:&lt;BR /&gt;123456789114CSVSentinfo Data:z800&lt;BR /&gt;123456789115CSVSentinfo Data:z800&lt;BR /&gt;123456789116Sem startedfrom Surface\0a&amp;lt;Surafce have a data&amp;gt;\0a &amp;lt;Surfacecame with Data&amp;gt;Ladbrdige&amp;lt;/Ocnce&amp;gt;\0a &amp;lt;Ladbrdige&amp;gt;Ocnce&amp;lt;/Final_Worl&amp;gt;\0a &amp;lt;KuluopToset&amp;gt;15284&amp;lt;/DecideTomove&amp;gt;\0a &amp;lt;SurafceCall&amp;gt;\0a &amp;lt;wait&amp;gt;\0a &amp;lt;wating&amp;gt;EventSent&amp;lt;/SurafceCall&amp;gt;\0a &amp;lt;/wait&amp;gt;\0a &amp;lt;/sa&amp;gt;\0a&amp;lt;/Surafce have a data&amp;gt;\0a\0a&lt;BR /&gt;123456789117CSVSentinfoFromCollege:&lt;BR /&gt;123456789118CSVSentinfo:sadjhjhisd&lt;BR /&gt;123456789119CSVSentinfo:Loshy890&lt;BR /&gt;123456789120CSVSentinfo:G7006L&lt;BR /&gt;123456789121CSVSentinfo:8shhgbve&lt;BR /&gt;123456789122CSVSentinfo:A0T0&lt;BR /&gt;123456789123CSVSentinfo Data:accepted&lt;BR /&gt;123456789124BP Tank: Bat to Surface L000passportAccepted&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 00:11:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702009#M238080</guid>
      <dc:creator>Neekheal</dc:creator>
      <dc:date>2024-10-16T00:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702014#M238081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273223"&gt;@Neekheal&lt;/a&gt;&amp;nbsp;all the rex commands should be a written as a single rex command.&amp;nbsp;&lt;BR /&gt;i mean, after first rex command, pls write rex try to match the extra characters and then write the 2nd rex command and then write rex command to match the extra characters, etc..&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=khisab_ustri  sourcetype=sosnmega  "*BP Tank: Bat from surface = *K00C0*" |dedup _time
|rex field=_raw "(?ms)(?&amp;lt;time_string&amp;gt;\d{12})BP Tank: Bat from Surface .*K00C0\d{21}(?&amp;lt;kmu_str&amp;gt;\d{2})*"
|rex field=_raw "(?&amp;lt;PC_sTime&amp;gt;\d{12})CSVSentinfo:L00Show your passport*"

to 

index=khisab_ustri  sourcetype=sosnmega  "*BP Tank: Bat from surface = *K00C0*" |dedup _time
|rex field=_raw "(?ms)(?&amp;lt;time_string&amp;gt;\d{12})BP Tank: Bat from Surface .*K00C0\d{21}(?&amp;lt;kmu_str&amp;gt;\d{2}) &amp;lt;&amp;lt;&amp;lt; some rex commands to match &amp;gt;&amp;gt;&amp;gt;  "(?&amp;lt;PC_sTime&amp;gt;\d{12})CSVSentinfo:L00Show your passport*"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 01:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702014#M238081</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-10-16T01:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702015#M238082</link>
      <description>&lt;P&gt;What should be the rex command to skip new lines ,characters or numbers and special characters and then to search and extract&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; "(?&amp;lt;PC_sTime&amp;gt;\d{12})CSVSentinfo:L00Show your passport*"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 01:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702015#M238082</guid>
      <dc:creator>Neekheal</dc:creator>
      <dc:date>2024-10-16T01:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702017#M238083</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273223"&gt;@Neekheal&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the text is literal and same for all logs, then you can include the direct lines inside the rex.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lets say "CSVSentinfo:L00Show your passport" is a "constant" in all logs, then you keep it as part of rex command:

 "(?&amp;lt;PC_sTime&amp;gt;\d{12})CSVSentinfo\:L00Show your passport.*(?P&amp;lt;Field2&amp;gt;rex cmd)"

to match newline and/or tab characters, pls include "\n" "\t"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 01:59:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702017#M238083</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-10-16T01:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702048#M238086</link>
      <description>&lt;P&gt;Just to be clear, are you saying that your sample data (as shown) has been ingested as a single event and that there are other lines in the event which are unrelated or at least you want to ignore?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 11:07:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702048#M238086</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-10-16T11:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702065#M238087</link>
      <description>&lt;P&gt;+1 on &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; 's question. Is this all just a huge chunk of data ingested as a single event and containing in fact multiple separate intertwined "streams" of data or are those separate events?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 13:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702065#M238087</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-10-16T13:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702120#M238108</link>
      <description>&lt;P&gt;Yes, they are multiple events.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 02:32:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702120#M238108</guid>
      <dc:creator>Neekheal</dc:creator>
      <dc:date>2024-10-17T02:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702121#M238109</link>
      <description>&lt;P&gt;Yes, different events.&lt;/P&gt;&lt;P&gt;I am very initial stage of SPL hence trying to figure it out.&lt;BR /&gt;TIA&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 02:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702121#M238109</guid>
      <dc:creator>Neekheal</dc:creator>
      <dc:date>2024-10-17T02:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to find Multi Line pattern</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702122#M238110</link>
      <description>&lt;P&gt;The attempted code shows several misunderstandings, otherwise the regex can be fixed.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Most importantly, you need to realize that&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Table" target="_blank" rel="noopener"&gt;table&lt;/A&gt;&amp;nbsp;command does not perform evaluation. &amp;nbsp;It can only tabulate fields that already have value.&lt;/LI&gt;&lt;LI&gt;Second, there are several obvious attempts to use asterisk (*) as wildcard in regex. &amp;nbsp;It is not. &amp;nbsp;In regex, * is a repetition token. &amp;nbsp;What you meant is perhaps &lt;U&gt;.*&lt;/U&gt;. &amp;nbsp;So I made changes as such.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Beside these, the first line in the sample also cannot match \d{21}\d2 because you used nonnumeric characters immediately after&amp;nbsp;&lt;U&gt;BP Tank: Bat from Surface = #07789*K00C0&lt;/U&gt;. &amp;nbsp;To make the following meaningful, I replaced those characters with numerals in the emulation. &amp;nbsp;What you should be using is perhaps something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=khisab_ustri  sourcetype=sosnmega  "*BP Tank: Bat from surface = *K00C0*"
|rex max_match=0 "(?ms)(?&amp;lt;time_string&amp;gt;\d{12})BP Tank: Bat from Surface .*K00C0\d{21}(?&amp;lt;kmu_str&amp;gt;\d{2})*"
|rex max_match=0 "(?&amp;lt;PC_sTime&amp;gt;\d{12})CSVSentinfo:L00Show your passport.*"
|rex max_match=0 "(?&amp;lt;CP_sTime&amp;gt;\d{12})CSVSentinfo Data:z800.*"
|rex max_match=0 "(?&amp;lt;MTB_sTime&amp;gt;\d{12})CSVSentinfoToCollege:.*"
|rex max_match=0 "(?&amp;lt;MFB_sTime&amp;gt;\d{12})CSVSentinfoFromCollege:.*"
|rex max_match=0 "(?&amp;lt;PR_sTime&amp;gt;\d{12})CSVSentinfo:G7006L.*"
|rex max_match=0 "(?&amp;lt;JR_sTime&amp;gt;\d{12})CSVSentinfo:A0T0.*"
|rex max_match=0 "(?&amp;lt;MR_sTime&amp;gt;\d{12})BP Tank: Bat to Surface .*L000passportAccepted.*"
| eval PC_minus_timestring = (PC_sTime- time_string),
  CP_minus_PC = mvmap(CP_sTime, (CP_sTime- PC_sTime)),
  MTB_minus_CP = (MTB_sTime-CP_sTime),
  MFB_minus_MTB = (MFB_sTime-MTB_sTime),
  PR_minus_MFB = (PR_sTime- MFB_sTime),
  JR_minus_PR = (JR_sTime-PR_sTime),
  MR_minus_JR = (MR_sTime-JR_sTime)
| table *_minus_*&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The modified sample data will give&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;CP_minus_PC&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;JR_minus_PR&lt;/TD&gt;&lt;TD&gt;MFB_minus_MTB&lt;/TD&gt;&lt;TD&gt;MR_minus_JR&lt;/TD&gt;&lt;TD&gt;PC_minus_timestring&lt;/TD&gt;&lt;TD&gt;PR_minus_MFB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;3&lt;/DIV&gt;&lt;DIV class=""&gt;7&lt;/DIV&gt;&lt;DIV class=""&gt;8&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Some additional pointers&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You should not use dedup on _time. &amp;nbsp;If you need to do that, something is wrong with your event data. &amp;nbsp;Fix that first.&lt;/LI&gt;&lt;LI&gt;rex command operates on _raw by default. &amp;nbsp;No need to specify.&lt;/LI&gt;&lt;LI&gt;Some fields can have multiple matches. &amp;nbsp;I added max_match=0. &amp;nbsp;Read &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex" target="_blank" rel="noopener"&gt;rex&lt;/A&gt;&amp;nbsp;document about its options.&lt;/LI&gt;&lt;LI&gt;Your sample data do not contain all fields you are trying to extract.&lt;/LI&gt;&lt;LI&gt;Your sample SPL does not does not use&amp;nbsp;&lt;U&gt;kmu_str&lt;/U&gt; field that is extracted.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is an emulation of modified sample data. &amp;nbsp;Play with it and compare with real data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw = "123456789102BP Tank: Bat from Surface = #07789*K00C012345678901234567890178 00003453534534534
123456789103UniverseToMachine\\0a&amp;lt;Ladbrdige&amp;gt;\\0a &amp;lt;SurfaceTake&amp;gt;GOP&amp;lt;/Ocnce&amp;gt;\\0a &amp;lt;Final_Worl-ToDO&amp;gt;Firewallset&amp;lt;/KuluopToset&amp;gt;\\0a&amp;lt;/
123456789105SetSurFacetoMost&amp;gt;7&amp;lt;/DecideTomove&amp;gt;\\0a &amp;lt;TakeaKooch&amp;gt;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;amp;#32;&amp;lt;/SurfaceBggien&amp;gt;\\0a &amp;lt;Closethe Work&amp;gt;0&amp;lt;/Csloethe Work&amp;gt;\\0a
123456789107CSVSentinfo:L00Show your passport
123456789108BP Tank: Bat from Surface = close ticket
123456789109CSVSentinfo:Guide iunit
123456789110CSVSentinfo Data:z800
123456789111CSVGErt Infro\"8900
123456789112CSGFajsh:984
123456789113CSVSentinfoToCollege:
123456789114CSVSentinfo Data:z800
123456789115CSVSentinfo Data:z800
123456789116Sem startedfrom Surface\\0a&amp;lt;Surafce have a data&amp;gt;\\0a &amp;lt;Surfacecame with Data&amp;gt;Ladbrdige&amp;lt;/Ocnce&amp;gt;\\0a &amp;lt;Ladbrdige&amp;gt;Ocnce&amp;lt;/Final_Worl&amp;gt;\\0a &amp;lt;KuluopToset&amp;gt;15284&amp;lt;/DecideTomove&amp;gt;\\0a &amp;lt;SurafceCall&amp;gt;\\0a &amp;lt;wait&amp;gt;\\0a &amp;lt;wating&amp;gt;EventSent&amp;lt;/SurafceCall&amp;gt;\\0a &amp;lt;/wait&amp;gt;\\0a &amp;lt;/sa&amp;gt;\\0a&amp;lt;/Surafce have a data&amp;gt;\\0a\\0a
123456789117CSVSentinfoFromCollege:
123456789118CSVSentinfo:sadjhjhisd
123456789119CSVSentinfo:Loshy890
123456789120CSVSentinfo:G7006L
123456789121CSVSentinfo:8shhgbve
123456789122CSVSentinfo:A0T0
123456789123CSVSentinfo Data:accepted
123456789124BP Tank: Bat to Surface L000passportAccepted"
``` the above emulates
index=khisab_ustri  sourcetype=sosnmega  "*BP Tank: Bat from surface = *K00C0*"
```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 04:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-find-Multi-Line-pattern/m-p/702122#M238110</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-10-17T04:03:05Z</dc:date>
    </item>
  </channel>
</rss>

