<?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: REgex to extract fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544767#M154267</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230269"&gt;@hashsplunk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\w+\/\w+\/(?&amp;lt;field_1&amp;gt;\w+)\/\w+\/(?&amp;lt;field_2&amp;gt;\w+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/mJvW2M/1" target="_blank"&gt;https://regex101.com/r/mJvW2M/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if the string you shared is in a field, you could modify the rex in this way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=your_field "^\w+\/\w+\/(?&amp;lt;field_1&amp;gt;\w+)\/\w+\/(?&amp;lt;field_2&amp;gt;\w+)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2021 13:09:38 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-03-22T13:09:38Z</dc:date>
    <item>
      <title>REgex to extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544765#M154266</link>
      <description>&lt;P&gt;&lt;SPAN&gt;AZImaging/Projects/IMG2012002/WSI/D419BC00001/E7004004/SM/96b819b9-fc86-b81b-a999-55a72df0e05a.svs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Above is the string which i want to extract 2 fields .&amp;nbsp;&lt;SPAN&gt;IMG2012002 and&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;D419BC00001. First value after 2 slashes and second value after 4 slashes .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can i write a regular expression for that ? Please help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544765#M154266</guid>
      <dc:creator>hashsplunk</dc:creator>
      <dc:date>2021-03-22T13:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: REgex to extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544767#M154267</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230269"&gt;@hashsplunk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\w+\/\w+\/(?&amp;lt;field_1&amp;gt;\w+)\/\w+\/(?&amp;lt;field_2&amp;gt;\w+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/mJvW2M/1" target="_blank"&gt;https://regex101.com/r/mJvW2M/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if the string you shared is in a field, you could modify the rex in this way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=your_field "^\w+\/\w+\/(?&amp;lt;field_1&amp;gt;\w+)\/\w+\/(?&amp;lt;field_2&amp;gt;\w+)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544767#M154267</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-22T13:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: REgex to extract fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544769#M154269</link>
      <description>&lt;LI-CODE lang="markup"&gt;([^\/]+\/){2}(?&amp;lt;first&amp;gt;[^\/]+)\/[^\/]+\/(?&amp;lt;second&amp;gt;[^\/]+)&lt;/LI-CODE&gt;&lt;P&gt;regex101.com is great for experimenting with regular expressions.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REgex-to-extract-fields/m-p/544769#M154269</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-22T13:12:36Z</dc:date>
    </item>
  </channel>
</rss>

