<?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: Use of tokenizer option with makemv in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82022#M20805</link>
    <description>&lt;P&gt;This probably works for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tokenizer="([^,]*)(,(\s[^,]*,?)*)?"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The tokenizer first captures a value:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;([^,]*)`)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then gobbles up everything that's not a field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(,(\s[^,]*,?)*)?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: As per jonuwz's answer I may have treated ", " badly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2013 16:39:10 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-04-02T16:39:10Z</dc:date>
    <item>
      <title>Use of tokenizer option with makemv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82021#M20804</link>
      <description>&lt;P&gt;I am trying to break a field based on some regex. Apparently this can be done with the tokenizer option of the makemv command. However, there is no example on how to use it and I keep getting the following error when I try "Error in 'makemv' command: The tokenizer regular expression is invalid"&lt;/P&gt;

&lt;P&gt;Basically, I am trying to break on commas(,) that are not followed by a blank space.&lt;/P&gt;

&lt;P&gt;End goal: "4,Something" would result in a new value, but "4, Something" would not.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 14:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82021#M20804</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-04-02T14:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Use of tokenizer option with makemv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82022#M20805</link>
      <description>&lt;P&gt;This probably works for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tokenizer="([^,]*)(,(\s[^,]*,?)*)?"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The tokenizer first captures a value:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;([^,]*)`)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then gobbles up everything that's not a field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(,(\s[^,]*,?)*)?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: As per jonuwz's answer I may have treated ", " badly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 16:39:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82022#M20805</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-04-02T16:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use of tokenizer option with makemv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82023#M20806</link>
      <description>&lt;P&gt;Example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 
| eval john="1 something,2 something else,3 something, with a comma,4 wibble"
| table john
| makemv tokenizer="(.+?)(?=,\S|$),?" john
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is this? : &lt;CODE&gt;"(.+?)(?=,\S|$),?"&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;For the tokenizer to work you need capture groups.&lt;/P&gt;

&lt;P&gt;What we're saying here is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(.+?)      grab everything - this is the capture group
(?=,\S|$)  until you get to a comma followed by a non-whitespace, or the end of the line
,?         if there's a comma at the end of the pattern, eat it
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;result :&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/sample_makemv.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 16:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82023#M20806</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-02T16:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use of tokenizer option with makemv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82024#M20807</link>
      <description>&lt;P&gt;As simple replace would do this job.  &lt;/P&gt;

&lt;P&gt;| &lt;EM&gt;replace "," with ", " in john&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;PS : As per my understood on the requirement &lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 05:29:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-of-tokenizer-option-with-makemv/m-p/82024#M20807</guid>
      <dc:creator>ckp123</dc:creator>
      <dc:date>2019-11-26T05:29:54Z</dc:date>
    </item>
  </channel>
</rss>

