<?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 Can I make field values case-sensitive? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15208#M1806</link>
    <description>&lt;P&gt;Is there a way to enforce case-sensitivity on a field by field basis?&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;myid="0ZP0YFS5Rl7pACDD1K002"&lt;/P&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;P&gt;myid="0ZP0YFS5Rl7pACDD1k002"&lt;/P&gt;

&lt;P&gt;where the lower-case k at the far right of the value makes these two field values different.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2010 02:49:57 GMT</pubDate>
    <dc:creator>maverick</dc:creator>
    <dc:date>2010-06-10T02:49:57Z</dc:date>
    <item>
      <title>Can I make field values case-sensitive?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15208#M1806</link>
      <description>&lt;P&gt;Is there a way to enforce case-sensitivity on a field by field basis?&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;myid="0ZP0YFS5Rl7pACDD1K002"&lt;/P&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;P&gt;myid="0ZP0YFS5Rl7pACDD1k002"&lt;/P&gt;

&lt;P&gt;where the lower-case k at the far right of the value makes these two field values different.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2010 02:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15208#M1806</guid>
      <dc:creator>maverick</dc:creator>
      <dc:date>2010-06-10T02:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can I make field values case-sensitive?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15209#M1807</link>
      <description>&lt;P&gt;You can use the &lt;CODE&gt;where&lt;/CODE&gt; command to enforce case sensitivity:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever | where myid="0ZP0YFS5Rl7pACDD1K002"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Jun 2010 03:16:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15209#M1807</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-06-10T03:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I make field values case-sensitive?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15210#M1808</link>
      <description>&lt;P&gt;values do not have case-sensitivity. operations &lt;EM&gt;on&lt;/EM&gt; values may have sensitivity to the case of the values. there is no global way to make every possible operation and function in Splunk case-insensitive, and besides "search", most are case-sensitive. You can of course always normalize most values using the "upper()" or "lower()" eval functions, but (for example) this can't be applied to match values in lookup tables.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2010 18:54:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15210#M1808</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-10T18:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can I make field values case-sensitive?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15211#M1809</link>
      <description>&lt;P&gt;Another options is to use the &lt;CODE&gt;regex&lt;/CODE&gt; command.  In general, the  &lt;CODE&gt;where&lt;/CODE&gt; option mentioned by Siegfried seems like the best for your specific usage scenario, but &lt;CODE&gt;regex&lt;/CODE&gt; would be more flexible when:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Trying to case-sensitively match text within the raw event (e.g. if a specific field is not already defined)&lt;/LI&gt;
&lt;LI&gt;Trying to match part of a field (because wildcard expansion does not work with the &lt;CODE&gt;where&lt;/CODE&gt; command, so you can't do &lt;CODE&gt;| where myid="*pACDD1K002"&lt;/CODE&gt; to case-sensitively match a suffix.)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Matching part of a raw event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever 0ZP0YFS5Rl7pACDD1K002 | regex _raw="\b0ZP0YFS5Rl7pACDD1K002\b"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A partial-field matching example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever myid="*pACDD1K002" | regex myid=".*pACDD1K002$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Jun 2010 00:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15211#M1809</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-12T00:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can I make field values case-sensitive?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15212#M1810</link>
      <description>&lt;P&gt;You should instead code the above as: sourcetype=whatever myid="0ZP0YFS5Rl7pACDD1K002" | where myid="0ZP0YFS5Rl7pACDD1K002". If you do not do so, the search will likely be &lt;EM&gt;much&lt;/EM&gt; less efficient, as it will need to bring back &lt;EM&gt;everything&lt;/EM&gt; from the sourcetype without taking advantage of the index, then filter it with &lt;CODE&gt;where&lt;/CODE&gt;. Instead, bring back only the items that match, regardless of case. This should be a &lt;EM&gt;much&lt;/EM&gt; smaller set and efficiently retrieved via the index, and you then are simply filtering out on a much smaller set.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2010 00:40:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15212#M1810</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-09T00:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I make field values case-sensitive?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15213#M1811</link>
      <description>&lt;P&gt;Please ensure that you include enough of the text search string in the base query to ensure that the search is efficiently using the index, e.g., &lt;CODE&gt;sourcetype=whatever "0ZP0YFS5Rl7pACDD1K002" | regex _raw="\b0ZP0YFS5Rl7pACDD1K002\b"&lt;/CODE&gt; should be a &lt;EM&gt;much&lt;/EM&gt; faster search.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2010 00:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-make-field-values-case-sensitive/m-p/15213#M1811</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-09T00:41:45Z</dc:date>
    </item>
  </channel>
</rss>

