<?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 to create a field extraction for a field that contains multiple values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260558#M78164</link>
    <description>&lt;P&gt;try if &lt;CODE&gt;openports&lt;/CODE&gt; is not already extracted:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query
| rex field=_raw "openports\=(?&amp;lt;openports&amp;gt;[^;]+)"
| rex field=openports max_match=0 "(?&amp;lt;port&amp;gt;[\d]+)\/(?&amp;lt;protocol&amp;gt;[^,\s]+)"
| table values(port)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If it's already extracted then remove the first line &lt;CODE&gt;| rex field=_raw "openports\=(?&amp;lt;openports&amp;gt;[^;]+)"&lt;/CODE&gt; and if depending on the last character if your earlier extraction caught &lt;CODE&gt;;&lt;/CODE&gt; as well then add additional exlusion in &lt;CODE&gt;[^,\s]&lt;/CODE&gt; to make it &lt;CODE&gt;[^,;\s]&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2016 22:00:19 GMT</pubDate>
    <dc:creator>gokadroid</dc:creator>
    <dc:date>2016-12-01T22:00:19Z</dc:date>
    <item>
      <title>How to create a field extraction for a field that contains multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260557#M78163</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I have the following event record. I need to create a field extraction on field called openports that is having multiple values highlighted in bold. How do I do this :&lt;/P&gt;

&lt;P&gt;2016-12-01T14:34:26.315202-06:00 XXX.xxx.xxx.xxx CounterACT[1762]: admission=New Host; hostname=xxx.xxx.xxx.xxx; ad_displayname=User; banner=Unknown; onsite=Yes; online=Yes; ip=xx.xxx.xx.xx; ad_name=User; latest_ioc_date_sensitivity=Low Severity: #012Medium Severity: #012High Severity: #012Critical Severity: ; atc_scan_details=Scan Start Time: #012Scan Duration (seconds): #012Scan Status: Never scanned#012Scan Errors: ; mac=Unknown; mac_colon=Irresolvable; mac_dash=Irresolvable; group=Windows; nic_vendor=Irresolvable; nic_vendor_string=Irresolvable; netfunction=Windows Machine; &lt;STRONG&gt;openports=22/TCP, 135/TCP, 21/TCP, 80/TCP, 137/UDP, 3389/TCP;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Any help will be greatly appreciated&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Obaid&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260557#M78163</guid>
      <dc:creator>mohammed7860</dc:creator>
      <dc:date>2020-09-29T12:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a field extraction for a field that contains multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260558#M78164</link>
      <description>&lt;P&gt;try if &lt;CODE&gt;openports&lt;/CODE&gt; is not already extracted:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query
| rex field=_raw "openports\=(?&amp;lt;openports&amp;gt;[^;]+)"
| rex field=openports max_match=0 "(?&amp;lt;port&amp;gt;[\d]+)\/(?&amp;lt;protocol&amp;gt;[^,\s]+)"
| table values(port)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If it's already extracted then remove the first line &lt;CODE&gt;| rex field=_raw "openports\=(?&amp;lt;openports&amp;gt;[^;]+)"&lt;/CODE&gt; and if depending on the last character if your earlier extraction caught &lt;CODE&gt;;&lt;/CODE&gt; as well then add additional exlusion in &lt;CODE&gt;[^,\s]&lt;/CODE&gt; to make it &lt;CODE&gt;[^,;\s]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 22:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260558#M78164</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-12-01T22:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a field extraction for a field that contains multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260559#M78165</link>
      <description>&lt;P&gt;Thanks gokadroid for you input, could you please help me do an automatic extraction for this field openports&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 03:57:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-field-extraction-for-a-field-that-contains/m-p/260559#M78165</guid>
      <dc:creator>mohammed7860</dc:creator>
      <dc:date>2016-12-02T03:57:35Z</dc:date>
    </item>
  </channel>
</rss>

