<?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: Search for field range of numbers inside of case statement in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475027#M133537</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=host (?&amp;lt;cde_model&amp;gt;vlt0*([1-9]|1[0-6])-she1)
| search cde_model=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See also:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/322170/how-to-use-regex-on-a-fields-value-in-a-search.html"&gt;https://answers.splunk.com/answers/322170/how-to-use-regex-on-a-fields-value-in-a-search.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/327465/how-can-i-use-regex-with-wildcard-patterns-in-a-se.html"&gt;https://answers.splunk.com/answers/327465/how-can-i-use-regex-with-wildcard-patterns-in-a-se.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2019 17:56:10 GMT</pubDate>
    <dc:creator>masonmorales</dc:creator>
    <dc:date>2019-09-10T17:56:10Z</dc:date>
    <item>
      <title>Search for field range of numbers inside of case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475026#M133536</link>
      <description>&lt;P&gt;Greetings!&lt;/P&gt;

&lt;P&gt;Hoping there is an easier way to write this sequential host list such as (host = "vlt(01 through 16)-she1") ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval cde_model = case (
host = "vlt01-she1" OR host = "vlt02-she1" OR host = "vlt03-she1" OR host = "vlt04-she1" OR host = "vlt05-she1" OR host = "vlt06-she1" OR host = "vlt07-she1" OR host = "vlt08-she1" OR host = "vlt09-she1" OR host = "vlt10-she1" OR host = "vlt11-she1" OR host = "vlt12-she1" OR host = "vlt13-she1" OR host = "vlt14-she1" OR host = "vlt15-she1" OR host = "vlt16-she1", "cde-460-she1",

host = "vlt181-she1" OR host = "vlt182-she1" OR host = "vlt183-she1" OR host = "vlt184-she1" OR host = "vlt185-she1" OR host = "vlt186-she1" OR host = "vlt187-she1" OR host = "vlt188-she1" OR host = "vlt189-she1" OR host = "vlt190-she1" OR host = "vlt191-she1" OR host = "vlt192-she1" OR host = "vlt193-she1" OR host = "vlt194-she1" OR host = "vlt195-she1" OR host = "vlt196-she1" OR host = "vlt197-she1" OR host = "vlt198-she1", "cde-475-she1",

1=1, "oops"
)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Sep 2019 16:41:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475026#M133536</guid>
      <dc:creator>rberkheimer</dc:creator>
      <dc:date>2019-09-10T16:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search for field range of numbers inside of case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475027#M133537</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=host (?&amp;lt;cde_model&amp;gt;vlt0*([1-9]|1[0-6])-she1)
| search cde_model=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See also:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/322170/how-to-use-regex-on-a-fields-value-in-a-search.html"&gt;https://answers.splunk.com/answers/322170/how-to-use-regex-on-a-fields-value-in-a-search.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/327465/how-can-i-use-regex-with-wildcard-patterns-in-a-se.html"&gt;https://answers.splunk.com/answers/327465/how-can-i-use-regex-with-wildcard-patterns-in-a-se.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 17:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475027#M133537</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2019-09-10T17:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search for field range of numbers inside of case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475028#M133538</link>
      <description>&lt;P&gt;Hmmm didn't think of rexing, thx for the input.&lt;/P&gt;

&lt;P&gt;errors with:&lt;BR /&gt;
Unknown search command '1'.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 18:13:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-field-range-of-numbers-inside-of-case-statement/m-p/475028#M133538</guid>
      <dc:creator>rberkheimer</dc:creator>
      <dc:date>2019-09-10T18:13:03Z</dc:date>
    </item>
  </channel>
</rss>

