<?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 do I edit my regular expression to extract the file path from my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203886#M59214</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "file_path=.+(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[A-z0-9\._\s-]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this run anywhere sample search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="file_path=\\?\C:\Windows\Temp\nsf9A28.tmp\System.dll" | table _raw | rex "file_path=.+(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[A-z0-9\._\s-]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 20 Dec 2016 20:15:36 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-12-20T20:15:36Z</dc:date>
    <item>
      <title>How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203885#M59213</link>
      <description>&lt;P&gt;Hello,  &lt;/P&gt;

&lt;P&gt;Trying to set up a field extraction to get the file path from a log source. Raw data looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;file_path=\\?\C:\Windows\Temp\nsf9A28.tmp\System.dll 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I set up a file extraction that looks like this.  &lt;CODE&gt;file_path: (?P[A-Z]:\\[A-Za-z\\0-9\s]+....)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Testing looks okay, but when we go to the field in a search, it comes up like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\\?\C:\Windows\Temp\nsf9A28.tmp\System.dll
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I adjust to drop the &lt;CODE&gt;\\?\&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;Also, how do I adjust for longer or shorter paths?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 19:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203885#M59213</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2016-12-20T19:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203886#M59214</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "file_path=.+(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[A-z0-9\._\s-]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this run anywhere sample search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="file_path=\\?\C:\Windows\Temp\nsf9A28.tmp\System.dll" | table _raw | rex "file_path=.+(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[A-z0-9\._\s-]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Dec 2016 20:15:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203886#M59214</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-20T20:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203887#M59215</link>
      <description>&lt;P&gt;Depending on how your data comes, either containing &lt;CODE&gt;file_path=&lt;/CODE&gt; or &lt;CODE&gt;file_path:&lt;/CODE&gt; try this regex below to save path in field called &lt;CODE&gt;actualPath&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query to return events
| rex "file_path(\=|\:)\s*(?&amp;lt;deleteThis&amp;gt;[^\w]+)(?&amp;lt;actualPath&amp;gt;[\S]+)"
| table deleteThis, actualPath
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/LnA6ck/1"&gt;See extraction here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 20:17:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203887#M59215</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-12-20T20:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203888#M59216</link>
      <description>&lt;P&gt;Okay, this works perfect on a search time regex.  When I try to make it a field extract, I get "Encountered the following error while trying to update: Regex: missing closing parenthesis"  I do not see where one is missing.&lt;/P&gt;

&lt;P&gt;I was pasting it into my existing file_path extract like this.&lt;/P&gt;

&lt;P&gt;file_path=.+(?P[A-Z]:(\)[A-z0-9._\s-]+)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203888#M59216</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2020-09-29T12:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203889#M59217</link>
      <description>&lt;P&gt;Oh noticed one thing when testing, which I am not sure about.  In some directories, you get (x86) for example.  While your rex was perfect for the rest, it dropped that.  Testing to get it back, when its there, did not work.   Is that due to the () ?  Is it a rex issue?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 14:34:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203889#M59217</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2016-12-21T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203890#M59218</link>
      <description>&lt;P&gt;Can you provide some sample entries where it's failing?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 14:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203890#M59218</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-21T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203891#M59219</link>
      <description>&lt;P&gt;Here is the raw, where the (x86) is at.&lt;/P&gt;

&lt;P&gt;rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1481920232 agent_uuid=771335d1-1070-43a5-aba6-d5d2d6eb06e7 cloud="US Cloud" type=1090519054 subtype=34 detector=SHA detection=W32.A78962E3EB-100.SBX.VIOC agent_user=ejones@ZOTECNET file_name=TBNotifier.exe file_path="C:\Program Files (x86)\AskPartnerNetwork\Toolbar\Updater\TBNotifier.exe" sha256=a78962e3ebde2876ba49ba646207c622e7dd4e66b0222108be06b6c49de5ab22 file_size=1928776 file_type=HTML file_ts=1478726223 parent_fname="" parent_sha256="" event_description="" sensor=0 instance_id=0 connection_id=1017 connection_sec=1481920231 direction=0 src_ip=10.0.0.118 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;

&lt;P&gt;Here is what it shows.&lt;/P&gt;

&lt;P&gt;file_path&lt;BR /&gt;
    C:\Program Files &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:11:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203891#M59219</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2020-09-29T12:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203892#M59220</link>
      <description>&lt;P&gt;somesoni2, &lt;/P&gt;

&lt;P&gt;Any suggestions with how to adjust for the (x86) issue?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 16:55:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203892#M59220</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2017-01-16T16:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203893#M59221</link>
      <description>&lt;P&gt;If the value of the file_path is always enclosed in double quotes, try like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[^\"]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 17:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203893#M59221</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-16T17:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203894#M59222</link>
      <description>&lt;P&gt;That worked perfectly on a search.&lt;/P&gt;

&lt;P&gt;To convert it to a field extraction, would this be correct?&lt;/P&gt;

&lt;P&gt;file_path:"file_path=.*(?P[A-Z]:(\)[^\"]+)"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:23:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203894#M59222</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2020-09-29T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203895#M59223</link>
      <description>&lt;P&gt;Use the same regex that you've in rex command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[^\"]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, when you type in searches/regular expression here, select that and click on Code Sample button on the editor tool box (button on top of writing area which says 101,010), to format it so that nothing gets truncated.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 19:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203895#M59223</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-16T19:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203896#M59224</link>
      <description>&lt;P&gt;Okay, did not think about that button.&lt;/P&gt;

&lt;P&gt;Get an error when I try to paste that into the Extraction field.&lt;/P&gt;

&lt;P&gt;"Encountered the following error while trying to update: Regex: missing closing parenthesis"&lt;/P&gt;

&lt;P&gt;Not seeing any missing though&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 19:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203896#M59224</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2017-01-16T19:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203897#M59225</link>
      <description>&lt;P&gt;The windows path always causes issues due to backward slash. Try any of this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\)[^\"]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:[^\"]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 19:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203897#M59225</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-16T19:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203898#M59226</link>
      <description>&lt;P&gt;Nuts, I spoke too soon.  &lt;IMG src="https://drive.google.com/open?id=0Bwu4qh_YdRN5YnpzRTdtYmJSUzA" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Seems that some entries work while some still have \?\ in them.  &lt;/P&gt;

&lt;P&gt;One that works.&lt;BR /&gt;
rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1481920232 agent_uuid=771335d1-1070-43a5-aba6-d5d2d6eb06e7 cloud="US Cloud" type=1090519054 subtype=34 detector=SHA detection=W32.A78962E3EB-100.SBX.VIOC agent_user=ejones@ZOTECNET file_name=TBNotifier.exe file_path="C:\Program Files (x86)\AskPartnerNetwork\Toolbar\Updater\TBNotifier.exe" sha256=a78962e3ebde2876ba49ba646207c622e7dd4e66b0222108be06b6c49de5ab22 file_size=1928776 file_type=HTML file_ts=1478726223 parent_fname="" parent_sha256="" event_description="" sensor=0 instance_id=0 connection_id=1017 connection_sec=1481920231 direction=0 src_ip=10.0.0.118 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;

&lt;P&gt;Example of one that failed.&lt;/P&gt;

&lt;P&gt;rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1481920232 agent_uuid=771335d1-1070-43a5-aba6-d5d2d6eb06e7 cloud="US Cloud" type=1090519054 subtype=Execute detector=SHA detection=W32.A78962E3EB-100.SBX.VIOC agent_user="SYSTEM@NT AUTHORITY" file_name=TBNotifier.exe file_path="\?\C:\Program Files (x86)\AskPartnerNetwork\Toolbar\Updater\TBNotifier.exe" sha256=a78962e3ebde2876ba49ba646207c622e7dd4e66b0222108be06b6c49de5ab22 file_size=1928776 file_type=HTML file_ts=1478726223 parent_fname=apnmcp.exe parent_sha256=b69749726c16e54fc2ec448748dba5136c412ee5a70443b559db89406ba811cb event_description="" sensor=0 instance_id=0 connection_id=1016 connection_sec=1481920231 direction=0 src_ip=10.0.0.118 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;

&lt;P&gt;Is it possible for one regex to do both?  If not, can I have two extracts with the same name for the sourcetype?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:23:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203898#M59226</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2020-09-29T12:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203899#M59227</link>
      <description>&lt;P&gt;This regex works for both type of entries.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:[^\"]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;see the run anywhere sample.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval name="rec_type=125 rec_type_simple=\"MALWARE EVENT\" event_sec=1481920232 agent_uuid=771335d1-1070-43a5-aba6-d5d2d6eb06e7 cloud=\"US Cloud\" type=1090519054 subtype=34 detector=SHA detection=W32.A78962E3EB-100.SBX.VIOC agent_user=ejones@ZOTECNET file_name=TBNotifier.exe file_path=\"C:\Program Files (x86)\AskPartnerNetwork\Toolbar\Updater\TBNotifier.exe\" sha256=a78962e3ebde2876ba49ba646207c622e7dd4e66b0222108be06b6c49de5ab22 file_size=1928776 file_type=HTML file_ts=1478726223 parent_fname=\"\" parent_sha256=\"\" event_description=\"\" sensor=0 instance_id=0 connection_id=1017 connection_sec=1481920231 direction=0 src_ip=10.0.0.118 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri=\"\" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0##rec_type=125 rec_type_simple=\"MALWARE EVENT\" event_sec=1481920232 agent_uuid=771335d1-1070-43a5-aba6-d5d2d6eb06e7 cloud=\"US Cloud\" type=1090519054 subtype=Execute detector=SHA detection=W32.A78962E3EB-100.SBX.VIOC agent_user=\"SYSTEM@NT AUTHORITY\" file_name=TBNotifier.exe file_path=\"\\?\C:\Program Files (x86)\AskPartnerNetwork\Toolbar\Updater\TBNotifier.exe\" sha256=a78962e3ebde2876ba49ba646207c622e7dd4e66b0222108be06b6c49de5ab22 file_size=1928776 file_type=HTML file_ts=1478726223 parent_fname=apnmcp.exe parent_sha256=b69749726c16e54fc2ec448748dba5136c412ee5a70443b559db89406ba811cb event_description=\"\" sensor=0 instance_id=0 connection_id=1016 connection_sec=1481920231 direction=0 src_ip=10.0.0.118 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri=\"\" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0" | table name | makemv name delim="##" | mvexpand name | rename name as _raw | rex "file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:[^\"]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 20:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203899#M59227</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-16T20:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203900#M59228</link>
      <description>&lt;P&gt;This is my search string &lt;CODE&gt;sourcetype=cisco:sourcefire rec_type_simple="MALWARE EVENT"   | rex "file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:(\\\)[^\"]+)" |stats count by file_path&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 20:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203900#M59228</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2017-01-16T20:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203901#M59229</link>
      <description>&lt;P&gt;Use this regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;file_path=.*(?P&amp;lt;filepath&amp;gt;[A-Z]:[^\"]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 21:02:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203901#M59229</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-16T21:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203902#M59230</link>
      <description>&lt;P&gt;&lt;IMG src="https://1drv.ms/i/s!AjeD4bQcnKDim0jXtesGxgw-C3-b" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;So close.  Not sure why some are not getting the correct dir.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 17:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203902#M59230</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2017-01-17T17:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203903#M59231</link>
      <description>&lt;P&gt;Samples of logs which are not getting proper field extracted?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 17:48:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203903#M59231</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-17T17:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression to extract the file path from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203904#M59232</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;    rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1484593326 agent_uuid=2c57a94e-6758-4ef2-9598-dda4ba314c2a cloud="US Cloud" type=553648143 subtype=0 detector=0 detection="" agent_user="" file_name="" file_path="\\?\C:\Program Files\Sourcefire\fireAMP\Quarantine\qrt01d2702b07961b79.003" sha256=1b89b0631d931d2f8cfe42ffb0a932cf3035c79700bb8f77c2de824defe114b2 file_size=0 file_type=0 file_ts=0 parent_fname="" parent_sha256="" event_description="Detection ID: 6376279778734899202" sensor=0 instance_id=0 connection_id=77 connection_sec=1484593334 direction=0 src_ip=192.168.1.106 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1484593326 agent_uuid=2c57a94e-6758-4ef2-9598-dda4ba314c2a cloud="US Cloud" type=553648143 subtype=0 detector=0 detection="" agent_user="" file_name="" file_path="\?\C:\Program Files\Sourcefire\fireAMP\Quarantine\qrt01d2702b07955824.002" sha256=90f5cd7d989973f12e6c494f6e25f60ef2822d81506b209c8a431c2a76687fca file_size=0 file_type=0 file_ts=0 parent_fname="" parent_sha256="" event_description="Detection ID: 6376279778734899201" sensor=0 instance_id=0 connection_id=76 connection_sec=1484593333 direction=0 src_ip=192.168.1.106 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;

&lt;P&gt;rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1484326304 agent_uuid=50a7aa9b-4a62-440a-bbfb-d30183df85f6 cloud="US Cloud" type=554696715 subtype=0 detector=0 detection="" agent_user="" file_name="" file_path="Flash Scan" sha256="" file_size=0 file_type=0 file_ts=0 parent_fname="" parent_sha256="" event_description="Scan ID: 193784, scanned directories: 0, scanned files: 3715, scanned processes: 111" sensor=0 instance_id=0 connection_id=71 connection_sec=1484326305 direction=0 src_ip=:: dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;

&lt;P&gt;rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1484314921 agent_uuid=09582dbf-1a4c-476a-9114-85765a6f8da1 cloud="US Cloud" type=2164260880 subtype=0 detector=0 detection="" agent_user="" file_name="" file_path="" sha256=dd21fcb1dbd5ff927b3ded134f9f7081bddf9aad6d46508cef9a4add93d7c581 file_size=0 file_type=0 file_ts=0 parent_fname="" parent_sha256="" event_description="Detection ID: 6375084042659823622, error code: 3221225524" sensor=0 instance_id=0 connection_id=67 connection_sec=1484314906 direction=0 src_ip=10.0.0.61 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;

&lt;P&gt;rec_type=125 rec_type_simple="MALWARE EVENT" event_sec=1484314921 agent_uuid=09582dbf-1a4c-476a-9114-85765a6f8da1 cloud="US Cloud" type=553648143 subtype=0 detector=0 detection="" agent_user="" file_name="" file_path="\?\C:\Program Files\Sourcefire\fireAMP\Quarantine\qrt01d26da2d1378c61.001" sha256=dd21fcb1dbd5ff927b3ded134f9f7081bddf9aad6d46508cef9a4add93d7c581 file_size=0 file_type=0 file_ts=0 parent_fname="" parent_sha256="" event_description="Detection ID: 6375084038364856322" sensor=0 instance_id=0 connection_id=62 connection_sec=1484314905 direction=0 src_ip=10.0.0.61 dest_ip=:: app_proto=0 agent_user=0 file_policy=00000000-0000-0000-0000-000000000000 disposition=0 retro_disposition=0 uri="" src_port=0 dest_port=0 src_ip_country=0 dest_ip_country=0 web_app=0 client_app=0 file_action=0 ip_proto=0 threat_score=0 num_ioc=0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-to-extract-the-file-path/m-p/203904#M59232</guid>
      <dc:creator>bworrellZP</dc:creator>
      <dc:date>2020-09-29T12:24:01Z</dc:date>
    </item>
  </channel>
</rss>

