<?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: Extract fields from multi value fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47749#M11398</link>
    <description>&lt;P&gt;The same way as extracting it from a single value field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | fields - count | eval foo = "New York City, NY, USA;Los Angeles, CA, USA" | makemv foo delim=";" | rex field=foo ", (?&amp;lt;state&amp;gt;[A-Z][A-Z]),"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Feb 2013 22:17:04 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-02-28T22:17:04Z</dc:date>
    <item>
      <title>Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47748#M11397</link>
      <description>&lt;P&gt;I am trying to create a new fields from a multi value fields. Here's an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;group_id, user_id  user_address         user_phone_number
a         123      cityA, NY, USA       123-234-345
          234      cityBC, NJ, USA      234-345-345
b         567      cityDEF, NY, USA     234-345-456
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;stats list(user_id), list(user_address), list(user_phone_number) by group_id&lt;/P&gt;

&lt;P&gt;user_id, user_address and user_phone_number are multi value fields.&lt;BR /&gt;
I want to be able to extract state information from user_address to generate a table like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;group_id, user_id  state         user_phone_number
a         123      NY            123-234-345
          234      NJ            234-345-345
b         567      NY            234-345-456
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I achieve this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47748#M11397</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2020-09-28T13:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47749#M11398</link>
      <description>&lt;P&gt;The same way as extracting it from a single value field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | fields - count | eval foo = "New York City, NY, USA;Los Angeles, CA, USA" | makemv foo delim=";" | rex field=foo ", (?&amp;lt;state&amp;gt;[A-Z][A-Z]),"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Feb 2013 22:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47749#M11398</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-28T22:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47750#M11399</link>
      <description>&lt;P&gt;With this query, if I run&lt;/P&gt;

&lt;P&gt;stats list(user_id), list(state), list(user_phone_number) by group_id&lt;/P&gt;

&lt;P&gt;I will get this: &lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;group_id, user_id  state         user_phone_number&lt;BR /&gt;
a         123      NY            123-234-345&lt;BR /&gt;
          234                    234-345-345&lt;BR /&gt;
b         567      NY            234-345-456&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
&lt;STRONG&gt;Only the first state in a group is displayed&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Any idea how to get a full list of states?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47750#M11399</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2020-09-28T13:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47751#M11400</link>
      <description>&lt;P&gt;What result are you getting when you enter my example query into splunk?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 17:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47751#M11400</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-01T17:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47752#M11401</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;
foo                                 state
New York City, NY, USA              NY
Los Angees, CA, USA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;CA is not listed&lt;/STRONG&gt;&lt;BR /&gt;
I am using splunk 4.3.1.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 21:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47752#M11401</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2013-03-01T21:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47753#M11402</link>
      <description>&lt;P&gt;I see. Over here in 5 it works like a charm.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 21:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47753#M11402</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-01T21:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47754#M11403</link>
      <description>&lt;P&gt;Maybe try a different regex? &lt;BR /&gt;
(?&lt;STATE&gt;[^,]+,[A-Z]+)&lt;/STATE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 22:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47754#M11403</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-03-01T22:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47755#M11404</link>
      <description>&lt;P&gt;Updated with (?&lt;STATE&gt;[^,]+,[A-Z]+), no states are returned.&lt;/STATE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;foo                                 state
New York City, NY, USA              
Los Angees, CA, USA
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:53:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47755#M11404</guid>
      <dc:creator>chiwang</dc:creator>
      <dc:date>2013-03-04T15:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from multi value fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47756#M11405</link>
      <description>&lt;P&gt;The issue is not the expression, that worked fine. Apparently your Splunk version treats multi-valued fields differently.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-fields-from-multi-value-fields/m-p/47756#M11405</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-04T15:55:53Z</dc:date>
    </item>
  </channel>
</rss>

