<?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 help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560509#M159291</link>
    <description>&lt;P&gt;No, this was regex was unable to extract the user field&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2021 18:12:10 GMT</pubDate>
    <dc:creator>SS1</dc:creator>
    <dc:date>2021-07-22T18:12:10Z</dc:date>
    <item>
      <title>Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560428#M159265</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have below sources,&lt;/P&gt;&lt;P&gt;source =&amp;nbsp; C:\Stats\user1\Tmpdata\Mappers\Consolesx\start.log&lt;/P&gt;&lt;P&gt;source =&amp;nbsp; C:\Stats\user2\Tmpdata\Mappers\Consolesx\start.log&lt;/P&gt;&lt;P&gt;source = C:\Stats\user3\Tmpdata\Mappers\Consolesx\start.log&lt;/P&gt;&lt;P&gt;source = C:\Stats\user4\Tmpdata\Mappers\Consolesx\start.log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of displaying full paths i want the source to display just, can we have a rex for this one&lt;/P&gt;&lt;P&gt;source = user1&lt;/P&gt;&lt;P&gt;source = user2&lt;/P&gt;&lt;P&gt;source = user3&lt;/P&gt;&lt;P&gt;source = user4&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 03:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560428#M159265</guid>
      <dc:creator>SS1</dc:creator>
      <dc:date>2021-07-22T03:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560432#M159267</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225125"&gt;@SS1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can you please try this?&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH 
| rex field=source "C:\\\\Stats\\\\(?&amp;lt;user&amp;gt;\w+)\\\\"
| table source user&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="_raw
source =  C:\Stats\user1\Tmpdata\Mappers\Consolesx\start.log
source =  C:\Stats\user2\Tmpdata\Mappers\Consolesx\start.log
source = C:\Stats\user3\Tmpdata\Mappers\Consolesx\start.log
source = C:\Stats\user4\Tmpdata\Mappers\Consolesx\start.log" | multikv forceheader=1| extract
| rex field=source "C:\\\\Stats\\\\(?&amp;lt;user&amp;gt;\w+)\\\\"
| table source user&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp; ?&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 05:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560432#M159267</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-22T05:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560509#M159291</link>
      <description>&lt;P&gt;No, this was regex was unable to extract the user field&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 18:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560509#M159291</guid>
      <dc:creator>SS1</dc:creator>
      <dc:date>2021-07-22T18:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560567#M159314</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225125"&gt;@SS1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the solution of&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; is running on my Splunk.&lt;/P&gt;&lt;P&gt;Eventually, you could try something near:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=source "C:\\\\Stats\\\\(?&amp;lt;user&amp;gt;[^\\\]+)\\\\"&lt;/LI-CODE&gt;&lt;P&gt;to test in this way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="_raw
source =  C:\Stats\user1\Tmpdata\Mappers\Consolesx\start.log
source =  C:\Stats\user2\Tmpdata\Mappers\Consolesx\start.log
source = C:\Stats\user3\Tmpdata\Mappers\Consolesx\start.log
source = C:\Stats\user4\Tmpdata\Mappers\Consolesx\start.log" | multikv forceheader=1| extract
| rex field=source "C:\\\\Stats\\\\(?&amp;lt;user&amp;gt;[^\\\]+)\\\\"
| table source user&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 06:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560567#M159314</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-07-23T06:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560718#M159371</link>
      <description>&lt;P&gt;Yes, this working now. Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jul 2021 21:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/560718#M159371</guid>
      <dc:creator>SS1</dc:creator>
      <dc:date>2021-07-25T21:57:03Z</dc:date>
    </item>
  </channel>
</rss>

