<?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 not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422406#M121301</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval string ="c:\ABC\DEF\LOGS\1.LOG"
| rex field=string ".*?\\\\\w+\\\(?&amp;lt;extract_attribute&amp;gt;\w+).+"
| table string extract_attribute
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Jun 2019 19:24:00 GMT</pubDate>
    <dc:creator>saurabhkharkar</dc:creator>
    <dc:date>2019-06-13T19:24:00Z</dc:date>
    <item>
      <title>regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422400#M121295</link>
      <description>&lt;P&gt;&lt;A href="https://regex101.com/r/PNYxi2/2"&gt;https://regex101.com/r/PNYxi2/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;not working in splunk.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?&amp;lt;v1&amp;gt;.+:\.+?\(.+?)\.+)': Regex: unmatched closing parenthesis
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422400#M121295</guid>
      <dc:creator>reverse</dc:creator>
      <dc:date>2019-06-13T19:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422401#M121296</link>
      <description>&lt;P&gt;what are you trying to parse ?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422401#M121296</guid>
      <dc:creator>saurabhkharkar</dc:creator>
      <dc:date>2019-06-13T19:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422402#M121297</link>
      <description>&lt;P&gt;I want to extract DEF.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:09:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422402#M121297</guid>
      <dc:creator>reverse</dc:creator>
      <dc:date>2019-06-13T19:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422403#M121298</link>
      <description>&lt;P&gt;&lt;A href="https://regex101.com/r/PNYxi2/3"&gt;https://regex101.com/r/PNYxi2/3&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422403#M121298</guid>
      <dc:creator>reverse</dc:creator>
      <dc:date>2019-06-13T19:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422404#M121299</link>
      <description>&lt;P&gt;Do you want to extract DEF or do you want to extract the name of the second directory, where DEF is located?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422404#M121299</guid>
      <dc:creator>jazzypai</dc:creator>
      <dc:date>2019-06-13T19:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422405#M121300</link>
      <description>&lt;P&gt;name of the second directory&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422405#M121300</guid>
      <dc:creator>reverse</dc:creator>
      <dc:date>2019-06-13T19:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422406#M121301</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval string ="c:\ABC\DEF\LOGS\1.LOG"
| rex field=string ".*?\\\\\w+\\\(?&amp;lt;extract_attribute&amp;gt;\w+).+"
| table string extract_attribute
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:24:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422406#M121301</guid>
      <dc:creator>saurabhkharkar</dc:creator>
      <dc:date>2019-06-13T19:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422407#M121302</link>
      <description>&lt;P&gt;Try out the following as for regex101.com&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;drive&amp;gt;\w)\:\\(?&amp;lt;first&amp;gt;[\w]+)\\(?&amp;lt;second&amp;gt;[\w]+)\\(?&amp;lt;third&amp;gt;[\w]+)\\(?&amp;lt;filename&amp;gt;[\d\w\.]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this out in splunk;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex field=string "(?&amp;lt;drive&amp;gt;\w)\:\\\(?&amp;lt;first&amp;gt;[\w]+)\\\(?&amp;lt;second&amp;gt;[\w]+)\\\(?&amp;lt;third&amp;gt;[\w]+)\\\(?&amp;lt;filename&amp;gt;[\d\w\.]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will parse the entire path that you listed.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:24:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422407#M121302</guid>
      <dc:creator>jazzypai</dc:creator>
      <dc:date>2019-06-13T19:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: regex not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422408#M121303</link>
      <description>&lt;P&gt;@reverse - A backslash seems to be misplaced in your expression. It should be &lt;CODE&gt;'(?&amp;lt;v1&amp;gt;.+:\.+?\(.+?\).+)':&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:32:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-not-working/m-p/422408#M121303</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-06-13T19:32:02Z</dc:date>
    </item>
  </channel>
</rss>

