<?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 current regex to extract fields from my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217835#M64011</link>
    <description>&lt;P&gt;For your data, I would not use the interactive field extractor in Splunk. Since the data follows a repetitive pattern, it will be easier to manually specify the extraction in the configuration files. Here is the manual page that you need: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;Create and maintain search-time field extractions through configuration files&lt;/A&gt; - scroll down to "Create advanced search-time field extractions with field transforms" to find the section that you need.&lt;/P&gt;

&lt;P&gt;Here is a starting point:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
REPORT-extfields=extract_my_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_my_fields]
DELIMS = ", ", ": "
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 Jan 2016 19:18:27 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2016-01-07T19:18:27Z</dc:date>
    <item>
      <title>How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217833#M64009</link>
      <description>&lt;P&gt;Looking for assistance on manually building a regex for the following data. Here is the data below  and how far along I was able to get with the Splunk regex builder. I continue getting the following error message:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The extraction failed. If you are extracting multiple fields, try removing one or more fields. Start with extractions that are embedded within longer text strings. 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you assist with that? I appreciate it. each field is seperate by a comma&lt;/P&gt;

&lt;P&gt;Data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jan  7 10:34:22, 172.20.1.62, Jan  7 14:34:23, DSO-TW-ASA-Prim-SFR SFIMS: [Primary Detection Engine (252a23cc-7196-11e4-8256-c709c2db90d1)][FMPA - Main Policy], Connection Type: End, User: fred, Client: SSL client, Application Protocol: HTTPS, Web App: Unknown, Access Control Rule Name: Malware | URL Monitor, Access Control Rule Action: Allow, Access Control Rule Reasons: Unknown, URL Category: Government, URL Reputation: High risk, URL: &lt;A href="https://sharepoint.fmpa.com" target="test_blank"&gt;https://sharepoint.fmpa.com&lt;/A&gt;, Interface Ingress: MPLS-MFN, Interface Egress: RouterNet, Security Zone Ingress: N/A, Security Zone Egress: N/A, Security Intelligence Matching IP: None, Security Intelligence Category: None, Client Version: (null), Number of File Events: 0, Number of IPS Events: 0, TCP Flags: 0x0, NetBIOS Domain: (null), Initiator Packets: 9, Responder Packets: 9, Initiator Bytes: 2457, Responder Bytes: 2974, Context: unknown {TCP} 172.23.3.151:60442 -&amp;gt; 10.0.0.88:443
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?P&amp;lt;Extract_Date&amp;gt;\w+\s+\d+\s+\d+:\d+:\d+)\s+(?P&amp;lt;Host&amp;gt;[^ ]+)\s+(?P&amp;lt;Date&amp;gt;\w+\s+\d+)\s+(?P&amp;lt;Time&amp;gt;[^ ]+)[^:\n]*:\s+(?P&amp;lt;DSO&amp;gt;\[\w+\s+\w+\s+\w+\s+\([a-f0-9]+\-\d+\-[a-f0-9]+\-\d+\-[a-f0-9]+\)\]\[\w+\s+\-\s+\w+\s+\w+\])(?:[^ \n]* ){3}(?P&amp;lt;Connection_Type&amp;gt;[^,]+)[^,\n]*,\s+\w+:\s+(?P&amp;lt;User&amp;gt;[^,]+),\s+\w+:\s+(?P&amp;lt;Client&amp;gt;[^,]+)[^:\n]*:\s+(?P&amp;lt;App_Protocol&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jan 2016 18:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217833#M64009</guid>
      <dc:creator>fmpa_isaac</dc:creator>
      <dc:date>2016-01-07T18:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217834#M64010</link>
      <description>&lt;P&gt;You're off to a good start.  Just insert a comma after your first capturing group and it will match.  Then carry on the same way for the rest of the fields.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 19:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217834#M64010</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-01-07T19:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217835#M64011</link>
      <description>&lt;P&gt;For your data, I would not use the interactive field extractor in Splunk. Since the data follows a repetitive pattern, it will be easier to manually specify the extraction in the configuration files. Here is the manual page that you need: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;Create and maintain search-time field extractions through configuration files&lt;/A&gt; - scroll down to "Create advanced search-time field extractions with field transforms" to find the section that you need.&lt;/P&gt;

&lt;P&gt;Here is a starting point:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
REPORT-extfields=extract_my_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_my_fields]
DELIMS = ", ", ": "
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jan 2016 19:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217835#M64011</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-01-07T19:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217836#M64012</link>
      <description>&lt;P&gt;I'd recommend you use a tool like RegEx101.com&lt;/P&gt;

&lt;P&gt;I'll get you started:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?P&amp;lt;extract_date&amp;gt;.*?),(?P&amp;lt;host&amp;gt;.*?),\s(?P&amp;lt;date&amp;gt;\w+\s\d+)\s(?P&amp;lt;time&amp;gt;\d+\:\d+\:\d+),\s(?P&amp;lt;DSO&amp;gt;.*?):.*Connection\sType\:(?P&amp;lt;connection_type&amp;gt;.*?),\sUser\:\s(?P&amp;lt;user&amp;gt;.*?),
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will extract the following fields and values:&lt;/P&gt;

&lt;P&gt;extract_date    [0-14]  &lt;CODE&gt;Jan 7 10:34:22&lt;/CODE&gt;&lt;BR /&gt;
host    [15-27] &lt;CODE&gt;172.20.1.62&lt;/CODE&gt;&lt;BR /&gt;
date    [29-34] &lt;CODE&gt;Jan 7&lt;/CODE&gt;&lt;BR /&gt;
time    [35-43] &lt;CODE&gt;14:34:23&lt;/CODE&gt;&lt;BR /&gt;
DSO [45-70] &lt;CODE&gt;DSO-TW-ASA-Prim-SFR SFIMS&lt;/CODE&gt;&lt;BR /&gt;
connection_type [175-179]   &lt;CODE&gt;End&lt;/CODE&gt;&lt;BR /&gt;
user    [187-191]   &lt;CODE&gt;fred&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you want more help, please specify the exact fields you want the extract and the associated values.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217836#M64012</guid>
      <dc:creator>jchampagne_splu</dc:creator>
      <dc:date>2020-09-29T08:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217837#M64013</link>
      <description>&lt;P&gt;Jchampagne, quite honestly I feel lost even in regex101. I am trying to extract all fields within this report. I will highlight the remaining ones I need. The problem is that because of the structure, I continue to get the same error. Basically any other field before : is what I am trying to extract. let me know if you can assist.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jan 15 14:09:43 172.20.1.62 Jan 15 18:09:49 DSO-TW-ASA-Prim-SFR SFIMS: [Primary Detection Engine (252a23cc-7196-11e4-8256-c709c2db90d1)][FMPA - Main Policy] Connection Type: End, User: annb, Client: SSL client, Application Protocol: HTTPS, Web App: Unknown, Access Control Rule Name: Malware | URL Monitor, Access Control Rule Action: Allow, Access Control Rule Reasons: Unknown, URL Category: Government, URL Reputation: High risk, URL: &lt;A href="https://fmpa.com" target="test_blank"&gt;https://fmpa.com&lt;/A&gt;, Interface Ingress: Internet, Interface Egress: RouterNet, Security Zone Ingress: N/A, Security Zone Egress: N/A, Security Intelligence Matching IP: None, Security Intelligence Category: None, Client Version: (null), Number of File Events: 0, Number of IPS Events: 0, TCP Flags: 0x0, NetBIOS Domain: (null), Initiator Packets: 15, Responder Packets: 17, Initiator Bytes: 4786, Responder Bytes: 9705, Context: unknown {TCP} 172.20.7.90:57535 -&amp;gt; 10.0.0.89:443
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jan 2016 20:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217837#M64013</guid>
      <dc:creator>fmpa_isaac</dc:creator>
      <dc:date>2016-01-15T20:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217838#M64014</link>
      <description>&lt;P&gt;Are these all the fields you want?&lt;/P&gt;

&lt;P&gt;extract_date: Jan 15 14:09:43 &lt;BR /&gt;
host: 172.20.1.62 &lt;BR /&gt;
date: Jan 15 &lt;BR /&gt;
time: 18:09:49 &lt;BR /&gt;
DSO-TW-ASA-Prim-SFR SFIMS: [Primary Detection Engine (252a23cc-7196-11e4-8256-c709c2db90d1)][FMPA - Main Policy] &lt;BR /&gt;
&lt;EM&gt;I'm not sure the field name or value is correct on the one above&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;connection_type: End&lt;BR /&gt;
user: annb&lt;BR /&gt;
client: SSL client&lt;BR /&gt;
application_protocol: HTTPS&lt;BR /&gt;
web_app: Unknown&lt;BR /&gt;
access_control_rule_name: Malware | URL Monitor&lt;BR /&gt;
access_control_rule_action: Allow&lt;BR /&gt;
access_control_rule_reasons: Unknown&lt;BR /&gt;
url_category: Government&lt;BR /&gt;
url_reputation: High risk&lt;BR /&gt;
url: &lt;A href="https://fmpa.com" target="_blank"&gt;https://fmpa.com&lt;/A&gt;&lt;BR /&gt;
interface_ingress: Internet&lt;BR /&gt;
interface_egress: RouterNet&lt;BR /&gt;
security_zone_ingress: N/A&lt;BR /&gt;
security_zone_egress: N/A&lt;BR /&gt;
security_intelligence_matching_ip: None&lt;BR /&gt;
security_intelligence_category: None&lt;BR /&gt;
client_version: (null)&lt;BR /&gt;
number_of_file_events: 0&lt;BR /&gt;
number_of_ips_events: 0&lt;BR /&gt;
tcp_flags: 0x0&lt;BR /&gt;
netbios_domain: (null)&lt;BR /&gt;
initiator_packets: 15&lt;BR /&gt;
responder_packets: 17&lt;BR /&gt;
initiator_bytes: 4786&lt;BR /&gt;
responder_bytes: 9705&lt;BR /&gt;
context: unknown {TCP} 172.20.7.90:57535 -&amp;gt; 10.0.0.89:443&lt;/P&gt;

&lt;P&gt;I'll help you out of the RegEx with this one, but you'll really be better off if you can start picking up a bit of the RegEx syntax so you can use RegEx101.com or other tools.  Would it help if I explained the syntax I'm using in the RegEx in my previous response?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217838#M64014</guid>
      <dc:creator>jchampagne_splu</dc:creator>
      <dc:date>2020-09-29T08:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217839#M64015</link>
      <description>&lt;P&gt;Yes, those are the fields.&lt;/P&gt;

&lt;P&gt;Absolutely, my goal is to be able to create them myself. In the meantime, are you able to point me to a tutorial on building these expressions?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 15:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217839#M64015</guid>
      <dc:creator>fmpa_isaac</dc:creator>
      <dc:date>2016-01-19T15:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217840#M64016</link>
      <description>&lt;P&gt;Best tutorial: &lt;A href="http://www.amazon.com/Teach-Yourself-Regular-Expressions-Minutes/dp/0672325667"&gt;Teach Yourself Regular Expressions in 10 Minutes&lt;/A&gt; by Ben Forta&lt;/P&gt;

&lt;P&gt;It isn't language-specific, and although it will take more than 10 minutes, it is short and to the point.&lt;/P&gt;

&lt;P&gt;Use a tool like &lt;A href="http://www.RegEx101.com"&gt;RegEx101.com&lt;/A&gt; or another to practice the things shown in the book.&lt;/P&gt;

&lt;P&gt;Online tutorials:&lt;BR /&gt;
&lt;A href="http://www.regexone.com"&gt;http://www.regexone.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.rexegg.com"&gt;http://www.rexegg.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Other tools (there are a zillion if you search for them...), which often have a tutorial component:&lt;BR /&gt;
&lt;A href="http://www.regexr.com"&gt;http://www.regexr.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.regexpal.com"&gt;http://www.regexpal.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.regular-expressions.info"&gt;http://www.regular-expressions.info&lt;/A&gt;&lt;BR /&gt;
RegEx Buddy - a Windows-based tool that costs $ but many people love&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2016 02:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217840#M64016</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-01-20T02:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217841#M64017</link>
      <description>&lt;P&gt;Okay, the following RegEx:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?P&amp;lt;EXTRACT_DATE&amp;gt;\w+\s\d+\s\d+:\d+:\d+)\s(?P&amp;lt;evt_host&amp;gt;[^\s]+)\s(?P&amp;lt;evt_date&amp;gt;\w+\s\d+)\s(?P&amp;lt;evt_time&amp;gt;[^\s]+)\sDSO-TW-ASA-Prim-SFR\sSFIMS:\s(?P&amp;lt;DSO_TW_ASA_Prim_SFR_SFIMS&amp;gt;.*)\sConnection\sType:\s(?P&amp;lt;connection_type&amp;gt;[^,]+),\sUser:\s(?P&amp;lt;user&amp;gt;[^,]+),\sClient:\s(?&amp;lt;client&amp;gt;[^,]+),\sApplication\sProtocol:\s(?P&amp;lt;protocol&amp;gt;[^,]+),\sWeb\sApp:\s(?P&amp;lt;web_app&amp;gt;[^,]+),\sAccess\sControl\sRule\sName:\s(?P&amp;lt;ac_rule_name&amp;gt;[^,]+),\sAccess\sControl\sRule\sAction:\s(?P&amp;lt;ac_rule_action&amp;gt;[^,]+),\sAccess\sControl\sRule\sReasons:\s(?P&amp;lt;ac_rule_reasons&amp;gt;[^,]+),\sURL\sCategory:\s(?P&amp;lt;url_category&amp;gt;[^,]+),\sURL\sReputation:\s(?P&amp;lt;url_reputation&amp;gt;[^,]+),\sURL:\s(?P&amp;lt;url&amp;gt;[^,]+),\sInterface\sIngress:\s(?P&amp;lt;if_ingress&amp;gt;[^,]+),\sInterface\sEgress:\s(?P&amp;lt;if_egress&amp;gt;[^,]+),\sSecurity\sZone\sIngress:\s(?P&amp;lt;sz_ingress&amp;gt;[^,]+),\sSecurity\sZone\sEgress:\s(?P&amp;lt;sz_egress&amp;gt;[^,]+),\sSecurity\sIntelligence\sMatching\sIP:\s(?P&amp;lt;si_matching_ip&amp;gt;[^,]+),\sSecurity\sIntelligence\sCategory:\s(?P&amp;lt;si_category&amp;gt;[^,]+),\sClient\sVersion:\s(?&amp;lt;client_version&amp;gt;[^,]+),\sNumber\sof\sFile\sEvents:\s(?P&amp;lt;num_file_events&amp;gt;[^,]+),\sNumber\sof\sIPS\sEvents:\s(?P&amp;lt;num_ips_events&amp;gt;[^,]+),\sTCP\sFlags:\s(?P&amp;lt;tcp_flags&amp;gt;[^,]+),\sNetBIOS\sDomain:\s(?P&amp;lt;netbios_domain&amp;gt;[^,]+),\sInitiator\sPackets:\s(?P&amp;lt;init_packets&amp;gt;[^,]+),\sResponder\sPackets:\s(?P&amp;lt;resp_packets&amp;gt;[^,]+),\sInitiator\sBytes:\s(?P&amp;lt;init_bytes&amp;gt;[^,]+),\sResponder\sBytes:\s(?P&amp;lt;resp_bytes&amp;gt;[^,]+),\sContext:\s(?P&amp;lt;context&amp;gt;.*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will give you the following fields:&lt;/P&gt;

&lt;P&gt;EXTRACT_DATE    [0-15]  &lt;CODE&gt;Jan 15 14:09:43&lt;/CODE&gt;&lt;BR /&gt;
evt_host    [16-27] &lt;CODE&gt;172.20.1.62&lt;/CODE&gt;&lt;BR /&gt;
evt_date    [28-34] &lt;CODE&gt;Jan 15&lt;/CODE&gt;&lt;BR /&gt;
evt_time    [35-43] &lt;CODE&gt;18:09:49&lt;/CODE&gt;&lt;BR /&gt;
DSO_TW_ASA_Prim_SFR_SFIMS   [71-156]    &lt;CODE&gt;[Primary Detection Engine (252a23cc-7196-11e4-8256-c709c2db90d1)][FMPA - Main Policy]&lt;/CODE&gt;&lt;BR /&gt;
connection_type [174-177]   &lt;CODE&gt;End&lt;/CODE&gt;&lt;BR /&gt;
user    [185-189]   &lt;CODE&gt;annb&lt;/CODE&gt;&lt;BR /&gt;
client  [199-209]   &lt;CODE&gt;SSL client&lt;/CODE&gt;&lt;BR /&gt;
protocol    [233-238]   &lt;CODE&gt;HTTPS&lt;/CODE&gt;&lt;BR /&gt;
web_app [249-256]   &lt;CODE&gt;Unknown&lt;/CODE&gt;&lt;BR /&gt;
ac_rule_name    [284-305]   &lt;CODE&gt;Malware | URL Monitor&lt;/CODE&gt;&lt;BR /&gt;
ac_rule_action  [335-340]   &lt;CODE&gt;Allow&lt;/CODE&gt;&lt;BR /&gt;
ac_rule_reasons [371-378]   &lt;CODE&gt;Unknown&lt;/CODE&gt;&lt;BR /&gt;
url_category    [394-404]   &lt;CODE&gt;Government&lt;/CODE&gt;&lt;BR /&gt;
url_reputation  [422-431]   &lt;CODE&gt;High risk&lt;/CODE&gt;&lt;BR /&gt;
url [438-454]   &lt;CODE&gt;&lt;A href="https://fmpa.com" target="_blank"&gt;https://fmpa.com&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;
if_ingress  [475-483]   &lt;CODE&gt;Internet&lt;/CODE&gt;&lt;BR /&gt;
if_egress   [503-512]   &lt;CODE&gt;RouterNet&lt;/CODE&gt;&lt;BR /&gt;
sz_ingress  [537-540]   &lt;CODE&gt;N/A&lt;/CODE&gt;&lt;BR /&gt;
sz_egress   [564-567]   &lt;CODE&gt;N/A&lt;/CODE&gt;&lt;BR /&gt;
si_matching_ip  [604-608]   &lt;CODE&gt;None&lt;/CODE&gt;&lt;BR /&gt;
si_category [642-646]   &lt;CODE&gt;None&lt;/CODE&gt;&lt;BR /&gt;
client_version  [664-670]   &lt;CODE&gt;(null)&lt;/CODE&gt;&lt;BR /&gt;
num_file_events [695-696]   &lt;CODE&gt;0&lt;/CODE&gt;&lt;BR /&gt;
num_ips_events  [720-721]   &lt;CODE&gt;0&lt;/CODE&gt;&lt;BR /&gt;
tcp_flags   [734-737]   &lt;CODE&gt;0x0&lt;/CODE&gt;&lt;BR /&gt;
netbios_domain  [755-761]   &lt;CODE&gt;(null)&lt;/CODE&gt;&lt;BR /&gt;
init_packets    [782-784]   &lt;CODE&gt;15&lt;/CODE&gt;&lt;BR /&gt;
resp_packets    [805-807]   &lt;CODE&gt;17&lt;/CODE&gt;&lt;BR /&gt;
init_bytes  [826-830]   &lt;CODE&gt;4786&lt;/CODE&gt;&lt;BR /&gt;
resp_bytes  [849-853]   &lt;CODE&gt;9705&lt;/CODE&gt;&lt;BR /&gt;
context [864-912]   &lt;CODE&gt;unknown {TCP} 172.20.7.90:57535 -&amp;gt; 10.0.0.89:443&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:31:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217841#M64017</guid>
      <dc:creator>jchampagne_splu</dc:creator>
      <dc:date>2020-09-29T08:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my current regex to extract fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217842#M64018</link>
      <description>&lt;P&gt;All of the RegEx resources that @lguinn mentions are fantastic.  I also really like the O'Reilly RegEx book: &lt;A href="http://shop.oreilly.com/product/9780596528126.do"&gt;http://shop.oreilly.com/product/9780596528126.do&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As for the RegEx I provided you, it is a fairly repetitive expression, so I'll break it down into the basic parts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?P&amp;lt;EXTRACT_DATE&amp;gt;\w+\s\d+\s\d+:\d+:\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is a named capturing group, &lt;STRONG&gt;(?P&lt;/STRONG&gt; begins the group.&lt;BR /&gt;
Anything we put in-between the less than &lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt; and greater than &lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt; signs will be come the name of the extraction. In this example, our extraction will be called EXTRACT_DATE&lt;BR /&gt;
Everything that comes after that is what we want to capture.&lt;BR /&gt;
  \w  - match word characters (letters, numbers, or _ )&lt;BR /&gt;
  +    - match one or more (in this case, capture one or more word characters)&lt;BR /&gt;
  \s   - match a whitespace charachter&lt;BR /&gt;
  \d  - match a digit charachter&lt;BR /&gt;
We'll capture everything that matches our RegEx values above until we reach the end of the capturing group &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This next expression is what I use almost entirely for the rest of the data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?P&amp;lt;evt_host&amp;gt;[^\s]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'll break down the part that is different from the above example:&lt;BR /&gt;
  [^\s]+&lt;BR /&gt;
  Normally, anything between brackets &lt;STRONG&gt;[]&lt;/STRONG&gt; tells RegEx to match any character inside those brackets. However, we've put a carat &lt;STRONG&gt;^&lt;/STRONG&gt; as the first character inside the brackets, which tells RegEx to match anything &lt;STRONG&gt;but&lt;/STRONG&gt; what's inside the brackets.  So what this says is that we should match any character except the whitespace character.  The plus sign &lt;STRONG&gt;+&lt;/STRONG&gt; after the brackets tells RegEx to match one or more characters that are not a whitespace character.  What we end up with, is a capture group that will match everything until we encounter a space or in other examples from my RegEx below, a comma.&lt;/P&gt;

&lt;P&gt;Please let me know if there is anything I can clarify further!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2016 15:58:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-current-regex-to-extract-fields-from-my-sample/m-p/217842#M64018</guid>
      <dc:creator>jchampagne_splu</dc:creator>
      <dc:date>2016-01-20T15:58:10Z</dc:date>
    </item>
  </channel>
</rss>

