<?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 Use different Regex in one search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-different-Regex-in-one-search/m-p/256758#M76907</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have a dashboard with a radio-button input. Depending on which value is selected, I want to use a different regex to extract some fields.&lt;BR /&gt;
Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | if STATUS==$token_radiobutton$,regex1,regex2 | table extracted fields from regex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I solve this problem?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2016 09:17:43 GMT</pubDate>
    <dc:creator>tgdvopab</dc:creator>
    <dc:date>2016-03-22T09:17:43Z</dc:date>
    <item>
      <title>Use different Regex in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-different-Regex-in-one-search/m-p/256758#M76907</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have a dashboard with a radio-button input. Depending on which value is selected, I want to use a different regex to extract some fields.&lt;BR /&gt;
Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | if STATUS==$token_radiobutton$,regex1,regex2 | table extracted fields from regex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I solve this problem?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 09:17:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-different-Regex-in-one-search/m-p/256758#M76907</guid>
      <dc:creator>tgdvopab</dc:creator>
      <dc:date>2016-03-22T09:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use different Regex in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-different-Regex-in-one-search/m-p/256759#M76908</link>
      <description>&lt;P&gt;It might be messy but you could create another input that loads based on the radio button that sets its variable to the REGEX that you would want to run, then, you pass that input's variable into the regex pipe.&lt;/P&gt;

&lt;P&gt;For example&lt;/P&gt;

&lt;P&gt;base search | if STATUS==$token_radiobutton$,regex1,regex2 | table extracted fields from regex&lt;/P&gt;

&lt;P&gt;Set the input's token value to the field STATUS&lt;/P&gt;

&lt;P&gt;Then  on the dashboard&lt;/P&gt;

&lt;P&gt;base search | regex $STATUS_TOK$ | &lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 17:00:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-different-Regex-in-one-search/m-p/256759#M76908</guid>
      <dc:creator>ryandg</dc:creator>
      <dc:date>2016-04-14T17:00:23Z</dc:date>
    </item>
  </channel>
</rss>

