<?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 command to extract in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519406#M146290</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i want like&lt;/P&gt;&lt;P&gt;win2016-test1&lt;/P&gt;&lt;P&gt;Win_7_cuckoo&lt;/P&gt;</description>
    <pubDate>Wed, 16 Sep 2020 05:05:24 GMT</pubDate>
    <dc:creator>itishree</dc:creator>
    <dc:date>2020-09-16T05:05:24Z</dc:date>
    <item>
      <title>rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519066#M146151</link>
      <description>&lt;P&gt;i have one host with multiple sourcetype , i want to extract some field but&amp;nbsp; that field also have some different so for all events i have to write different different rex command , is there any way to write rex command for all events&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Win_7_cuckoo.vmx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;packer-centos6.vmx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;test-vm-auto2.vmx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;win-10-test1.vmx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;so from here except .vmx&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;can any one&amp;nbsp; help for this ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 13:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519066#M146151</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-11T13:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519068#M146152</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry but I don't understand your question:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;do you want to find a way to apply a field extraction (with one common regex) to all sourcetypes?&lt;/LI&gt;&lt;LI&gt;do you want to apply a different regex to each sourcetypes?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If the first you could try to associate the field extraction to an host&amp;nbsp; or a source instead to a sourcetype, I don't like but it's possible.&lt;/P&gt;&lt;P&gt;If the second, it's not possible: you have to use the correct regex for each sourcetype.&lt;/P&gt;&lt;P&gt;The best approach could be that you share two or three samples of your data indicating what you want to extract.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 13:44:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519068#M146152</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-11T13:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519334#M146249</link>
      <description>&lt;P&gt;&lt;SPAN&gt;yes , i&amp;nbsp; want to find a way to apply a field extraction (with one common regex) to all sourcetypes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is it possible?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 04:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519334#M146249</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-14T04:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519347#M146260</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;no it isn't possible, you have to copy the field extraction for all sourcetypes.&lt;/P&gt;&lt;P&gt;I understand that it isn't easy to manage, but it permits to maintain more control on your data.&lt;/P&gt;&lt;P&gt;There'a also the choice to associate the field extraction to host and/or source if could be useful for you, in this way it's common to all the sourcetypes associated to that host or source.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 07:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519347#M146260</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-14T07:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519354#M146264</link>
      <description>&lt;P&gt;index="" ".vmx" host="" | rex field=_raw (?P&amp;lt;VM&amp;gt;\w+\/\w+\w+.vmx)(?!vmx) | rex field=_raw (?P&amp;lt;VM&amp;gt;\w+-\w+\/\w+\-\w+.vmx)(?!vmx) | rex field=_raw (?&amp;lt;VM&amp;gt;\w+\-\w+\-\w+\/\w+\-\w+\-\w+.vmx)| stats count by VM&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result is like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Caldera/Caldera.vmx&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cuckoo_SNDBX/Cuckoo_SNDBX.vmx&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Win_7_cuckoo/Win_7_cuckoo.vmx&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;kali/kali.vmx&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;kali2019/kali2019.vmx&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but i want&amp;nbsp; :&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Caldera&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Cuckoo_SNDBX&lt;/P&gt;&lt;P&gt;Win_7_cuckoo&lt;/P&gt;&lt;P&gt;kali2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 05:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519354#M146264</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-16T05:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519355#M146265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;using your sample (if you could share a real log it could be more affidable!), I see that you could use this regex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| "\/(?&amp;lt;VMX&amp;gt;[^\.]*)\.vmx"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/WUUCpw/1" target="_blank"&gt;https://regex101.com/r/WUUCpw/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 07:51:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519355#M146265</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-14T07:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519371#M146271</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try this regex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\/[^\/]*\/[^\/]*\/[^\/]*\/(?&amp;lt;VMX&amp;gt;[^\.]*)\.vmx"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/WUUCpw/2" target="_blank"&gt;https://regex101.com/r/WUUCpw/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 08:30:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519371#M146271</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-14T08:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519406#M146290</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;i want like&lt;/P&gt;&lt;P&gt;win2016-test1&lt;/P&gt;&lt;P&gt;Win_7_cuckoo&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 05:05:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519406#M146290</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-16T05:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519408#M146291</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;is this a different question or the same?&lt;/P&gt;&lt;P&gt;if a different one, please open a new one, that's useful for all the other people of Community so me and the other people can help you.&lt;/P&gt;&lt;P&gt;If it's the same, please, as the previous, share a sample of your logs.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 11:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519408#M146291</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-14T11:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519411#M146292</link>
      <description>&lt;P&gt;same one&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 12:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519411#M146292</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-14T12:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519413#M146293</link>
      <description>&lt;P&gt;In result i am getting like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="363px" height="25px"&gt;datastore1/packer-win12/packer-win12&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="363px" height="32px"&gt;datastore1/packer_centos6/packer_centos6&lt;/TD&gt;&lt;TD width="40px" height="32px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="363px" height="25px"&gt;datastore1/packer_centos7/packer_centos7&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="363px" height="25px"&gt;datastore1/packer_ubuntu18/packer_ubuntu18&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want&amp;nbsp; like this only name of that&lt;/P&gt;&lt;P&gt;packer_ubuntu18&lt;/P&gt;&lt;P&gt;packer_centos7&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 12:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519413#M146293</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-14T12:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519415#M146295</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;these logs aredifferent than the previous, can we use two regexes (one for the previous and one for these) or do you want only one regex?&lt;/P&gt;&lt;P&gt;in both cases, can you share a sample of all the possible logs to take with the regex?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 12:16:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519415#M146295</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-14T12:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519418#M146298</link>
      <description>&lt;P&gt;same one only... i am getting this result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from this i want like&amp;nbsp; only name of vm&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;packer-centos6&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;packer-win12&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;packer_ubuntu18&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 13:58:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519418#M146298</guid>
      <dc:creator>itishree</dc:creator>
      <dc:date>2020-09-15T13:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: rex command to extract</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519429#M146301</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222102"&gt;@itishree&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;As you can see, I sent to you two regexes with the old logs you shared, two versions because you sent two different versions of logs (before results you'gettin' in, then sample logs).&lt;/P&gt;&lt;P&gt;So, could you share a sample of all the kind of logs?&lt;/P&gt;&lt;P&gt;Anyway, the regex to extract from the results you shared is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\w*\/[^\/]*\/(?&amp;lt;my_field&amp;gt;\S*)\s*$"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/m9VYnT/1," target="_blank"&gt;https://regex101.com/r/m9VYnT/1,&lt;/A&gt; but probably isn't correct.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 12:55:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-command-to-extract/m-p/519429#M146301</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-14T12:55:44Z</dc:date>
    </item>
  </channel>
</rss>

