<?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: Manipulate Token Value and use in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528342#M149180</link>
    <description>&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search Job_Name IN ($tok_Job_Name$)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 15:45:01 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-11-06T15:45:01Z</dc:date>
    <item>
      <title>Manipulate Token Value and use in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528335#M149176</link>
      <description>&lt;P&gt;Hopefully, I can explain this to where it makes sense. I have a forum where I use a TEXT input to generate a token to search for one jobname in the data. This works perfectly for one jobname. I would like to be able to enter one or many different values. Normally I would use a multi-select, but there are over 65,000 possible jobnames. My JobName text input will generate token "tok_Job_Name", then in the search I have&lt;/P&gt;&lt;P&gt;| search Job_Name="$tok_Job_Name$"&lt;/P&gt;&lt;P&gt;I like to be able to enter one job for example JOBAA, or many JOBAA,JOBBB,JOBCC, etc and have the search return all jobs with the given jobnames. Is there a way to manipulate the token value within the search or create a new token after some regex? My thought was, I could use a simple regex command like&lt;/P&gt;&lt;P&gt;| rex field=$tok_Job_Name$ mode=sed "s/,/*","*/g", then the token would be formatted correctly to us a search IN. Hopefully, this makes sense and someone may be able to offer an idea. Thank you in advance for any and all help is given!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 14:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528335#M149176</guid>
      <dc:creator>ekammer1</dc:creator>
      <dc:date>2020-11-06T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate Token Value and use in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528342#M149180</link>
      <description>&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search Job_Name IN ($tok_Job_Name$)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528342#M149180</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-11-06T15:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate Token Value and use in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528344#M149182</link>
      <description>&lt;P&gt;This works if the user puts the full job name for each item ie.. JOBAA,JOBB. I would also like to wild card, so I could search for JOBA,JOBBB and get back all jobs that have JOBA in them&lt;BR /&gt;Results&lt;/P&gt;&lt;P&gt;JOBAA&lt;/P&gt;&lt;P&gt;JOBAC&lt;/P&gt;&lt;P&gt;JOBAX&lt;/P&gt;&lt;P&gt;JOBBB&lt;/P&gt;&lt;P&gt;I could just instruct the user to add * when not using the full job name. Unless there is a way to manipulate the token adding this dynamically.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Manipulate-Token-Value-and-use-in-search/m-p/528344#M149182</guid>
      <dc:creator>ekammer1</dc:creator>
      <dc:date>2020-11-06T15:53:41Z</dc:date>
    </item>
  </channel>
</rss>

