<?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 regular expression on a multivalue field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348591#M103176</link>
    <description>&lt;P&gt;Try like this. It'll create a new field with just the extn.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search with file filetype
| rex field=filetypes max_match=0 "(?&amp;lt;extns&amp;gt;\.\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Mar 2017 16:04:14 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-03-08T16:04:14Z</dc:date>
    <item>
      <title>How to create a regular expression on a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348590#M103175</link>
      <description>&lt;P&gt;I have a multivalue (MV) field "filetypes" with values such as:&lt;/P&gt;

&lt;P&gt;test/Makefile.am,test/och_test.cc,test/fully1.py,24,FKP/pro.pl&lt;/P&gt;

&lt;P&gt;I need to keep only the extension listed (such as am, cc, py, pl, etc..)  so I have two questions:&lt;/P&gt;

&lt;P&gt;A. The appropriate regular expression&lt;BR /&gt;
B. Is it more appropriate to run a regex prior splitting a MV field or after?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 15:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348590#M103175</guid>
      <dc:creator>jlkokko</dc:creator>
      <dc:date>2017-03-08T15:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regular expression on a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348591#M103176</link>
      <description>&lt;P&gt;Try like this. It'll create a new field with just the extn.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search with file filetype
| rex field=filetypes max_match=0 "(?&amp;lt;extns&amp;gt;\.\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 16:04:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348591#M103176</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-08T16:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regular expression on a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348592#M103177</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | mvexpand filetypes | rex field=filetypes "^(?&amp;lt;file_prefix&amp;gt;.+)\.(?&amp;lt;file_suffix&amp;gt;[^\.]+)$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 18:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348592#M103177</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-08T18:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regular expression on a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348593#M103178</link>
      <description>&lt;P&gt;Both of the above worked well...wondering if one less expensive than the other&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 18:27:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348593#M103178</guid>
      <dc:creator>jlkokko</dc:creator>
      <dc:date>2017-03-08T18:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a regular expression on a multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348594#M103179</link>
      <description>&lt;P&gt;Mine was geared towards enabling the later commands that you will surely be interested in doing.  You can look at the &lt;CODE&gt;Job Inspector&lt;/CODE&gt; to compare efficiencies.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 18:37:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-regular-expression-on-a-multivalue-field/m-p/348594#M103179</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-08T18:37:06Z</dc:date>
    </item>
  </channel>
</rss>

