<?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: How to check field values are valid?? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-field-values-are-valid/m-p/303361#M91274</link>
    <description>&lt;P&gt;hey @chitreshkumar&lt;/P&gt;

&lt;P&gt;try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval sequence="EH12839911" | append [| makeresults | eval sequence="EH12831421"] |  append [| makeresults | eval sequence="3512839911"] |eval status=if(match(sequence,"^[A-Za-z]{2}[0-9]{8}"),"Valid","Invalid")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ideally in your environment you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_search&amp;gt; | eval status=if(match(sequence,"^[A-Za-z]{2}[0-9]{8}"),"Valid","Invalid")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this works!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2018 07:09:33 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-01-12T07:09:33Z</dc:date>
    <item>
      <title>How to check field values are valid??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-field-values-are-valid/m-p/303360#M91273</link>
      <description>&lt;P&gt;I have field which is having sequence number .I want to check if it is valid and make a new field that will give if sequence number field is valid/invalid . Format is like  "EH12839911" 10 digits first two letters alphabet while next 8 are digits.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 06:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-check-field-values-are-valid/m-p/303360#M91273</guid>
      <dc:creator>chitreshakumar</dc:creator>
      <dc:date>2018-01-12T06:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to check field values are valid??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-field-values-are-valid/m-p/303361#M91274</link>
      <description>&lt;P&gt;hey @chitreshkumar&lt;/P&gt;

&lt;P&gt;try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval sequence="EH12839911" | append [| makeresults | eval sequence="EH12831421"] |  append [| makeresults | eval sequence="3512839911"] |eval status=if(match(sequence,"^[A-Za-z]{2}[0-9]{8}"),"Valid","Invalid")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ideally in your environment you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_search&amp;gt; | eval status=if(match(sequence,"^[A-Za-z]{2}[0-9]{8}"),"Valid","Invalid")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this works!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 07:09:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-check-field-values-are-valid/m-p/303361#M91274</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-12T07:09:33Z</dc:date>
    </item>
  </channel>
</rss>

