<?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: Help creating regex extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590579#M205616</link>
    <description>&lt;P&gt;I am marking your post as the solution.&amp;nbsp; However, i am sending you a private message with details that shows Splunk still extracting a different field i.e. UTC time despite the "RuleName" being empty.&amp;nbsp; This doesn't make sense because regex101.com says otherwise.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 06:51:15 GMT</pubDate>
    <dc:creator>neerajs_81</dc:creator>
    <dc:date>2022-03-24T06:51:15Z</dc:date>
    <item>
      <title>Help creating regex extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590556#M205605</link>
      <description>&lt;P&gt;Gentlemen,&lt;BR /&gt;We are ingesting Windows SYSmon logs via TA-microsoft-sysmon , and the raw events are showing in XML format.&amp;nbsp; &amp;nbsp;There are couple of fields that did not get extracted and even with IFX, the accuracy of extracting these 2 fields isn't working 100%.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Below is one of the XML tags / elements from my raw event.&amp;nbsp; Can someone pls assist me with regex for extracting&amp;nbsp; techqniue_id and technique_name ??&amp;nbsp; &amp;nbsp;As you can see, these 2 are embedded within the "RuleName" tag.&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;LI-CODE lang="markup"&gt;&amp;lt;Data Name='RuleName'&amp;gt;technique_id=T1055.001,technique_name=Dynamic-link Library&amp;lt;/Data&amp;gt;&lt;/LI-CODE&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;I have tried on regex101.com but can't get my capture group to extract these 2 values.&amp;nbsp; At the end of the day, i want 2 fields&amp;nbsp;&amp;nbsp;techqniue_id ( with a value=T1055.001)&amp;nbsp; &amp;nbsp;and technique_name ( value = Dynamic-link Library) to show up under "Interesting fields" .&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 04:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590556#M205605</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-24T04:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating regex extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590567#M205607</link>
      <description>&lt;P&gt;Does this help?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data Name='RuleName'&amp;gt;technique_id=(?&amp;lt;technique_id&amp;gt;[^,]+),technique_name=(?&amp;lt;technique_name&amp;gt;[^&amp;lt;]+)&amp;lt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/v0bIol/1" target="_self"&gt;https://regex101.com/r/v0bIol/1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 06:05:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590567#M205607</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-24T06:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating regex extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590575#M205613</link>
      <description>&lt;P&gt;Thank you so much. That did the job for 90% of the events.&amp;nbsp; However i just noticed there are some raw events as below wherein the "RuleName" is empty&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Data Name='RuleName'&amp;gt;-&amp;lt;/Data&amp;gt;
&amp;lt;Data Name='EventType'&amp;gt;SetValue&amp;lt;/Data&amp;gt;
&amp;lt;Data Name='UtcTime'&amp;gt;2022-03-24 06:12:51.184&amp;lt;/Data&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;In such cases,&amp;nbsp; the regex yours as well as the one generated by IFX ends up extracting technique_name ='UTCTime&amp;gt;2022-03-24 06:12:51&amp;lt;.&lt;BR /&gt;&lt;BR /&gt;Any suggestions how to make it NOT extract or&amp;nbsp; if the "RuleName" attribute is empty ?&amp;nbsp; Basically in such cases, both technique_id and technique_name can be empty as well.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 06:44:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590575#M205613</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-24T06:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating regex extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590577#M205615</link>
      <description>&lt;P&gt;If the element is empty, nothing is extracted&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/YBEmIM/1" target="_self"&gt;https://regex101.com/r/YBEmIM/1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 06:47:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590577#M205615</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-24T06:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating regex extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590579#M205616</link>
      <description>&lt;P&gt;I am marking your post as the solution.&amp;nbsp; However, i am sending you a private message with details that shows Splunk still extracting a different field i.e. UTC time despite the "RuleName" being empty.&amp;nbsp; This doesn't make sense because regex101.com says otherwise.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 06:51:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-creating-regex-extraction/m-p/590579#M205616</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-03-24T06:51:15Z</dc:date>
    </item>
  </channel>
</rss>

