<?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: Case statement with a regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550287#M156155</link>
    <description>&lt;P&gt;Are you always trying to get everything apart from the last two characters?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval part=substr(field,1,len(field)-2)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 03 May 2021 22:22:35 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-05-03T22:22:35Z</dc:date>
    <item>
      <title>Case statement with a regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550284#M156153</link>
      <description>&lt;P&gt;I'm trying to use a case statement and assign part of a field for each case statement. For example case(len(field)=5, regex that takes the first 3 characters of field, len(field=7), regex takes the first 5 characters,...)&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 22:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550284#M156153</guid>
      <dc:creator>klim</dc:creator>
      <dc:date>2021-05-03T22:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement with a regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550287#M156155</link>
      <description>&lt;P&gt;Are you always trying to get everything apart from the last two characters?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval part=substr(field,1,len(field)-2)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 May 2021 22:22:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550287#M156155</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-03T22:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement with a regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550291#M156157</link>
      <description>&lt;P&gt;no that was just a coincidence but i think you provided the answer. Substr will do since each different length I want a substring of the field and it can be used in the case statement. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 22:34:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Case-statement-with-a-regex/m-p/550291#M156157</guid>
      <dc:creator>klim</dc:creator>
      <dc:date>2021-05-03T22:34:30Z</dc:date>
    </item>
  </channel>
</rss>

