<?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: REX - Concatenating expressions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609605#M211964</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As requested.&amp;nbsp;&amp;nbsp;Used this URL/tool...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://regex101.com/r/nE14zp/1" target="_blank"&gt;https://regex101.com/r/nE14zp/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;...to check these REX strings...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;^\S+\s(?&amp;lt;microService&amp;gt;\S+).*&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;(?i)^(?:[^\+]*\+){2}\d+\]\s+\"(?P&amp;lt;missingFileDetails&amp;gt;[^\"]+)&lt;/P&gt;&lt;P&gt;...using this test string...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;2022-08-16T04:00:13.231444+00:00 CBF.microService af312b94-8abc-49ed-af80-969a5b0044e4[[APP/PROC/WEB/2]] 139.59.241.107, 100.64.240.3 - - - [16/Aug/2022:04:00:13 +0000] "GET /git/notifyCommit?url=2DQDJjcLvzZRdjs6bf9k0KOtJCs&amp;amp;branches=2DQDJjcLvzZRdjs6bf9k0KOtJCs HTTP/1.1" 404 188&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The individual commands work but I am unable to concatenate [to get a table of microservices and missing files].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 08:10:51 GMT</pubDate>
    <dc:creator>Mick_OBrien</dc:creator>
    <dc:date>2022-08-16T08:10:51Z</dc:date>
    <item>
      <title>REX - How can these two REX commands be merged?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609591#M211960</link>
      <description>&lt;P&gt;I have two REX strings that work independently...&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;^\S+\s(?&amp;lt;microService&amp;gt;\S+).*&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;[supplied by previous SPLUNK answer]&lt;/P&gt;
&lt;P&gt;...and...&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;"(?i)^(?:[^\+]*\+){2}\d+\]\s+\"(?P&amp;lt;missingFileDetails&amp;gt;[^\"]+)"&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;[generated via erex]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can these two REX commands be merged?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609591#M211960</guid>
      <dc:creator>Mick_OBrien</dc:creator>
      <dc:date>2022-08-16T13:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: REX - Concatenating expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609596#M211962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236514"&gt;@Mick_OBrien&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to answer to your question, you should share some sample of your logs!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 07:52:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609596#M211962</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-08-16T07:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: REX - Concatenating expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609605#M211964</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As requested.&amp;nbsp;&amp;nbsp;Used this URL/tool...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://regex101.com/r/nE14zp/1" target="_blank"&gt;https://regex101.com/r/nE14zp/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;...to check these REX strings...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;^\S+\s(?&amp;lt;microService&amp;gt;\S+).*&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;(?i)^(?:[^\+]*\+){2}\d+\]\s+\"(?P&amp;lt;missingFileDetails&amp;gt;[^\"]+)&lt;/P&gt;&lt;P&gt;...using this test string...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;2022-08-16T04:00:13.231444+00:00 CBF.microService af312b94-8abc-49ed-af80-969a5b0044e4[[APP/PROC/WEB/2]] 139.59.241.107, 100.64.240.3 - - - [16/Aug/2022:04:00:13 +0000] "GET /git/notifyCommit?url=2DQDJjcLvzZRdjs6bf9k0KOtJCs&amp;amp;branches=2DQDJjcLvzZRdjs6bf9k0KOtJCs HTTP/1.1" 404 188&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The individual commands work but I am unable to concatenate [to get a table of microservices and missing files].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 08:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609605#M211964</guid>
      <dc:creator>Mick_OBrien</dc:creator>
      <dc:date>2022-08-16T08:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: REX - Concatenating expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609608#M211967</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236514"&gt;@Mick_OBrien&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as you can see in the regex101 you shared the double regex is working on the sample you used, but maybe there are some differences in other logs and for this reason the double regex doesn't work.&lt;/P&gt;&lt;P&gt;Anyway, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;^\d+-\d+-\d+T\d+:\d+:\d+\.\d+\+\d+:\d+\s+(?&amp;lt;microservice&amp;gt;\w+).*MESSAGE\=(?&amp;lt;message&amp;gt;.+)&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 08:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609608#M211967</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-08-16T08:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: REX - Concatenating expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609613#M211970</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry but I cannot get this to work - this rex string returned multiple pages of empty fields...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;rex field=_raw ^\d+-\d+-\d+T\d+:\d+:\d+\.\d+\+\d+:\d+\s+(?&amp;lt;microservice&amp;gt;\w+).*MESSAGE\=(?&amp;lt;message&amp;gt;.+)&lt;/P&gt;&lt;P&gt;its not picking up the microservice NOR does the test string supplied contain text 'MESSAGE='&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 08:28:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609613#M211970</guid>
      <dc:creator>Mick_OBrien</dc:creator>
      <dc:date>2022-08-16T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: REX - Concatenating expressions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609633#M211983</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "^\S+\s(?&amp;lt;microService&amp;gt;\S+).*?\"(?P&amp;lt;missingFileDetails&amp;gt;[^\"]+)\""&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 Aug 2022 11:59:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-How-can-these-two-REX-commands-be-merged/m-p/609633#M211983</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-08-16T11:59:39Z</dc:date>
    </item>
  </channel>
</rss>

