<?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 use split in search? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422421#M74217</link>
    <description>&lt;P&gt;Can you post a sample of the event and what is currently being extracted? it's hard to understand what you are trying to do.&lt;/P&gt;

&lt;P&gt;So a Field called token is extracted and it's value could be a String like "121 or 265"? &lt;BR /&gt;
You could do an extraction on the token field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=token "(?&amp;lt;token1&amp;gt;\d{3})\sor\s(?&amp;lt;token2&amp;gt;\d{3})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will create 2 new fields, token1 and token2&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 14:45:53 GMT</pubDate>
    <dc:creator>guarisma</dc:creator>
    <dc:date>2019-08-02T14:45:53Z</dc:date>
    <item>
      <title>How to use split in search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422420#M74216</link>
      <description>&lt;P&gt;Hi, how to me use a command split or other command that make two field from one?&lt;BR /&gt;
Example: Im get a &lt;CODE&gt;token&lt;/CODE&gt; with text  &lt;CODE&gt;"1** or 2**"&lt;/CODE&gt;, I must use this in search &lt;CODE&gt;| where field=$token$&lt;/CODE&gt; that get all event with 100-299 number, or using &lt;CODE&gt;| eval field2=split($token$," or ")&lt;/CODE&gt; and next step using a &lt;CODE&gt;mvindex(field2, 0)&lt;/CODE&gt;, but this not work. And, how to make an exception if in token is "*".&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 10:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422420#M74216</guid>
      <dc:creator>sbimizry</dc:creator>
      <dc:date>2019-08-02T10:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use split in search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422421#M74217</link>
      <description>&lt;P&gt;Can you post a sample of the event and what is currently being extracted? it's hard to understand what you are trying to do.&lt;/P&gt;

&lt;P&gt;So a Field called token is extracted and it's value could be a String like "121 or 265"? &lt;BR /&gt;
You could do an extraction on the token field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=token "(?&amp;lt;token1&amp;gt;\d{3})\sor\s(?&amp;lt;token2&amp;gt;\d{3})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will create 2 new fields, token1 and token2&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 14:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422421#M74217</guid>
      <dc:creator>guarisma</dc:creator>
      <dc:date>2019-08-02T14:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use split in search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422422#M74218</link>
      <description>&lt;P&gt;From what I understand (but I agree it is a bit unclear), he has a dashboard with a text input, resulting in a token &lt;CODE&gt;$token$&lt;/CODE&gt;. That text input can contain a search string like &lt;CODE&gt;"1** or 2**"&lt;/CODE&gt; which he would like to apply to a certain field to filter the results.&lt;/P&gt;

&lt;P&gt;You might want to take a look at this (rather old) question and answer about manipulating a token: &lt;A href="https://answers.splunk.com/answers/127021/manipulate-a-token-string-in-a-form.html"&gt;https://answers.splunk.com/answers/127021/manipulate-a-token-string-in-a-form.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Assuming that approach still works, I think that provides all the ingredients needed to solve your challenge as well.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 10:37:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-split-in-search/m-p/422422#M74218</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-08-05T10:37:53Z</dc:date>
    </item>
  </channel>
</rss>

