<?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: How to extract fields from source? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702791#M238264</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/205249"&gt;@karthi2809&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you can use this regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=source "^\/\w+\/\w+\/(?&amp;lt;environment&amp;gt;\w+)\/\w+-(?&amp;lt;component&amp;gt;[^-]+)-(?&amp;lt;filename&amp;gt;.*)"&lt;/LI-CODE&gt;&lt;P&gt;you can test this regex at&amp;nbsp;&lt;A href="https://regex101.com/r/0VJvAw/1" target="_blank"&gt;https://regex101.com/r/0VJvAw/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 09:43:51 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-10-25T09:43:51Z</dc:date>
    <item>
      <title>How to extract fields from source?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702788#M238263</link>
      <description>&lt;P&gt;How to extract fields from below source.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/audit/logs/QTEST/qtestw-core_server4-core_server4.log

I need extract QTEST as environment qtestw as hostname core_server4 as component core_server4.log as filename&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 25 Oct 2024 09:33:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702788#M238263</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-10-25T09:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from source?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702791#M238264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/205249"&gt;@karthi2809&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you can use this regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=source "^\/\w+\/\w+\/(?&amp;lt;environment&amp;gt;\w+)\/\w+-(?&amp;lt;component&amp;gt;[^-]+)-(?&amp;lt;filename&amp;gt;.*)"&lt;/LI-CODE&gt;&lt;P&gt;you can test this regex at&amp;nbsp;&lt;A href="https://regex101.com/r/0VJvAw/1" target="_blank"&gt;https://regex101.com/r/0VJvAw/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 09:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702791#M238264</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-10-25T09:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from source?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702792#M238265</link>
      <description>&lt;P&gt;Try this :&lt;/P&gt;&lt;PRE&gt;&amp;lt;your_search&amp;gt;|rex field=source "\/audit\/logs\/(?&amp;lt;environment&amp;gt;[^\/]*)\/(?&amp;lt;hostname&amp;gt;[^-]*)\-(?&amp;lt;component&amp;gt;[^-]*)\-(?&amp;lt;filename&amp;gt;.*$)"&lt;/PRE&gt;&lt;P&gt;------&lt;/P&gt;&lt;H5&gt;If you find this solution helpful, please consider&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;accepting it&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;awarding karma points !!&lt;/STRONG&gt;&lt;/H5&gt;</description>
      <pubDate>Fri, 25 Oct 2024 09:50:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-source/m-p/702792#M238265</guid>
      <dc:creator>Jawahir</dc:creator>
      <dc:date>2024-10-25T09:50:46Z</dc:date>
    </item>
  </channel>
</rss>

