<?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: Can you help me with my regular expression extraction? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415953#M119741</link>
    <description>&lt;P&gt;Thank you for your reply. I was able to to do this ,using the below expression &lt;/P&gt;

&lt;P&gt;"\/(?[^\/]+)$"&lt;/P&gt;</description>
    <pubDate>Tue, 16 Oct 2018 06:38:22 GMT</pubDate>
    <dc:creator>swetar</dc:creator>
    <dc:date>2018-10-16T06:38:22Z</dc:date>
    <item>
      <title>Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415947#M119735</link>
      <description>&lt;P&gt;Can anyone please suggest to me how I can break this event...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PATH="/user/hive/datastore/xyz.db/file_name1"
PATH="/user/hive/datastore/xyz.db/file_name2"
PATH="/user/hive/datastore/xyz.db/file_name3"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Into this required output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;required output 
file_name1
file_name2
file_name3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance&lt;BR /&gt;
swetar&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 02:09:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415947#M119735</guid>
      <dc:creator>swetar</dc:creator>
      <dc:date>2018-10-12T02:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415948#M119736</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5897i5A7999BA99385CE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 02:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415948#M119736</guid>
      <dc:creator>Rob2520</dc:creator>
      <dc:date>2018-10-12T02:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415949#M119737</link>
      <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;try this search anywhere:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | makeresults count=1
    | eval  PATH="\"/user/hive/datastore/xyz.db/file_name1\";\"/user/hive/datastore/xyz.db/file_name2\";\"/user/hive/datastore/xyz.db/file_name3\""
    | makemv PATH delim=";"
    | mvexpand PATH
    | table PATH
    | rename COMMENT as "above generates data, below is your solution"
    | rex field=PATH "\"\/(?&amp;lt;dir_1&amp;gt;[^\/]+)\/(?&amp;lt;dir_2&amp;gt;[^\/]+)\/(?&amp;lt;dir_3&amp;gt;[^\/]+)\/(?&amp;lt;dir_4&amp;gt;[^\/]+)\/(?&amp;lt;file_name&amp;gt;[^\"]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;screenshot:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5898i9AB4ECB60290FC8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 02:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415949#M119737</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-10-12T02:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415950#M119738</link>
      <description>&lt;P&gt;Thank you for your reply . I tried in this way. But didn't worked. Can you please suggest me,where I am wrong .&lt;BR /&gt;
sourcetype="XXXXXX"| mvexpand PATH&lt;BR /&gt;
| table PATH&lt;BR /&gt;
 | rex field=PATH "\"\/(?[^\/]+)\/(?[^\/]+)\/(?[^\/]+)\/(?[^\/]+)\/(?[^\"]+)" &lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 09:24:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415950#M119738</guid>
      <dc:creator>swetar</dc:creator>
      <dc:date>2018-10-15T09:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415951#M119739</link>
      <description>&lt;P&gt;Thank you for your reply . I tried this way but didn't work. I am new to regular expression. Can you please suggest me with complete syntax.&lt;/P&gt;

&lt;P&gt;Many thanks&lt;BR /&gt;
Swetar&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 09:27:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415951#M119739</guid>
      <dc:creator>swetar</dc:creator>
      <dc:date>2018-10-15T09:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415952#M119740</link>
      <description>&lt;P&gt;Thank you for your reply. I was able to do this ,using the below expression &lt;/P&gt;

&lt;P&gt;"\/(?[^\/]+)$"&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 06:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415952#M119740</guid>
      <dc:creator>swetar</dc:creator>
      <dc:date>2018-10-16T06:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my regular expression extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415953#M119741</link>
      <description>&lt;P&gt;Thank you for your reply. I was able to to do this ,using the below expression &lt;/P&gt;

&lt;P&gt;"\/(?[^\/]+)$"&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 06:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-regular-expression-extraction/m-p/415953#M119741</guid>
      <dc:creator>swetar</dc:creator>
      <dc:date>2018-10-16T06:38:22Z</dc:date>
    </item>
  </channel>
</rss>

