<?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 Combining Splunk ITSI regular expression SPL? in Splunk ITSI</title>
    <link>https://community.splunk.com/t5/Splunk-ITSI/Combining-Splunk-ITSI-regular-expression-SPL/m-p/642754#M2736</link>
    <description>&lt;P&gt;I need help to combine line 1 and 2 make it as one regular expression line in SPL query&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; &amp;nbsp; &amp;nbsp; | rex "(?&amp;lt;object&amp;gt;gov\.usda\.fsa\.[^\s]+)"&lt;BR /&gt;2.&amp;nbsp; &amp;nbsp; &amp;nbsp; | eval object=split(coalesce(object, "NA"),"."),object=mvindex(object,-1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help!&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 19:55:20 GMT</pubDate>
    <dc:creator>AnushaJone</dc:creator>
    <dc:date>2023-05-10T19:55:20Z</dc:date>
    <item>
      <title>Combining Splunk ITSI regular expression SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Combining-Splunk-ITSI-regular-expression-SPL/m-p/642754#M2736</link>
      <description>&lt;P&gt;I need help to combine line 1 and 2 make it as one regular expression line in SPL query&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; &amp;nbsp; &amp;nbsp; | rex "(?&amp;lt;object&amp;gt;gov\.usda\.fsa\.[^\s]+)"&lt;BR /&gt;2.&amp;nbsp; &amp;nbsp; &amp;nbsp; | eval object=split(coalesce(object, "NA"),"."),object=mvindex(object,-1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help!&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 19:55:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Combining-Splunk-ITSI-regular-expression-SPL/m-p/642754#M2736</guid>
      <dc:creator>AnushaJone</dc:creator>
      <dc:date>2023-05-10T19:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk ITSI regular expression SPL</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Combining-Splunk-ITSI-regular-expression-SPL/m-p/642756#M2737</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254428"&gt;@AnushaJone&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You've not provided any example the raw event and the expected outcome of the rex.&amp;nbsp; So, assuming you are looking for the top-level domain each time, then here is a run anywhere example of what to do...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="gov.usda.fsa.blah"
| rex "(?&amp;lt;object&amp;gt;gov\.usda\.fsa\.[^\s]+)"
| eval object=split(coalesce(object, "NA"),"."), object=mvindex(object,-1)
| rex "gov\.usda\.fsa\.(?&amp;lt;object2&amp;gt;[^\s]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the last rex line gives the same result and the rex and eval above.&amp;nbsp; However, maybe you're looking for something more generic&amp;nbsp;¯\_(ツ)_/¯&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 04:35:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Combining-Splunk-ITSI-regular-expression-SPL/m-p/642756#M2737</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-05-10T04:35:15Z</dc:date>
    </item>
  </channel>
</rss>

