<?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 develop Regex to find invalid pattern in a skill level expression string. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581202#M202485</link>
    <description>&lt;P&gt;thank you very much,&amp;nbsp;ITWhisperer...&amp;nbsp; your Whisper ALWAYS the best.&lt;/P&gt;&lt;P&gt;Btw, the 00&amp;nbsp; should also be detected as false, so, I made a&amp;nbsp; little change for skill level&amp;nbsp; expression.&lt;/P&gt;&lt;P&gt;Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 00 &amp;amp; ( Peach = 0 | Tomato &amp;gt;2) &amp;amp; (Strawberry =7)&lt;/P&gt;&lt;P&gt;| rex mode=sed field=test "s/(?&amp;lt;var&amp;gt;\w+)\s*(?&amp;lt;comparator&amp;gt;[&amp;lt;&amp;gt;=]+)\s*(?&amp;lt;num&amp;gt;0|[1-9]\d*)//g"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jan 2022 15:19:52 GMT</pubDate>
    <dc:creator>wangkevin1029</dc:creator>
    <dc:date>2022-01-15T15:19:52Z</dc:date>
    <item>
      <title>How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581172#M202471</link>
      <description>&lt;P&gt;Hi， Splunkers，&lt;/P&gt;&lt;P&gt;I have some skill expression as below:&lt;/P&gt;&lt;P&gt;Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 0&amp;nbsp; &amp;amp; ( Peach = 0 | Tomato &amp;gt;) &amp;amp;&amp;nbsp; (Strawberry =7)&lt;/P&gt;&lt;P&gt;this skill expression covers all possible combinations.&lt;/P&gt;&lt;P&gt;How&amp;nbsp; to develop a Regex&amp;nbsp; to find any invalid string in this expression?&amp;nbsp; Btw,&amp;nbsp; &amp;nbsp;extra space between different strings, or symbol is ok here.&lt;/P&gt;&lt;P&gt;for example,&amp;nbsp; like here,&amp;nbsp; after apple, there is&amp;nbsp; double 0 with space,&amp;nbsp; there is space between tomato,&amp;nbsp; &amp;nbsp;and there is a missing right bracket for Strawberry =7, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 0 0&amp;nbsp; &amp;amp; ( Peach = 0 | To mato &amp;gt;) &amp;amp;&amp;nbsp; (Strawberry =7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 02:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581172#M202471</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-15T02:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581184#M202479</link>
      <description>&lt;P&gt;Assuming a valid part of the expression is a word followed by comparison operator followed by a number interspersed by zero or more spaces&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(?&amp;lt;var&amp;gt;\w+)\s*(?&amp;lt;comparator&amp;gt;[&amp;lt;&amp;gt;=]+)\s*(?&amp;lt;num&amp;gt;\d+)&lt;/LI-CODE&gt;&lt;P&gt;you could remove all valid expressions and ensure you don't have any words or numbers left&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval expression=split("Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 0  &amp;amp; ( Peach = 0 | Tomato &amp;gt;) &amp;amp;  (Strawberry =7)!Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 0 0  &amp;amp; ( Peach = 0 | To mato &amp;gt;) &amp;amp;  (Strawberry =7!Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 0  &amp;amp; ( Peach = 0 | Tomato &amp;gt;0) &amp;amp;  (Strawberry =7)!Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 00  &amp;amp; ( Peach = 0 | Tomato &amp;gt;2) &amp;amp;  (Strawberry =7)","!")
| mvexpand expression
| fields - _time
``` the lines above set up some dummy data (two bad and two corrected) ```
| eval test=expression
| rex mode=sed field=test "s/(?&amp;lt;var&amp;gt;\w+)\s*(?&amp;lt;comparator&amp;gt;[&amp;lt;&amp;gt;=]+)\s*(?&amp;lt;num&amp;gt;\d+)//g"
| eval valid=if(match(test,"[\d\w]"),"false","true")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 15 Jan 2022 08:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581184#M202479</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-15T08:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581202#M202485</link>
      <description>&lt;P&gt;thank you very much,&amp;nbsp;ITWhisperer...&amp;nbsp; your Whisper ALWAYS the best.&lt;/P&gt;&lt;P&gt;Btw, the 00&amp;nbsp; should also be detected as false, so, I made a&amp;nbsp; little change for skill level&amp;nbsp; expression.&lt;/P&gt;&lt;P&gt;Orange &amp;gt; 5 &amp;amp; apple &amp;lt; 00 &amp;amp; ( Peach = 0 | Tomato &amp;gt;2) &amp;amp; (Strawberry =7)&lt;/P&gt;&lt;P&gt;| rex mode=sed field=test "s/(?&amp;lt;var&amp;gt;\w+)\s*(?&amp;lt;comparator&amp;gt;[&amp;lt;&amp;gt;=]+)\s*(?&amp;lt;num&amp;gt;0|[1-9]\d*)//g"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 15:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581202#M202485</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-15T15:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581220#M202490</link>
      <description>&lt;P&gt;ITWhisperer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your clarification.&lt;/P&gt;&lt;P&gt;Beside, I tried to filter this valid or invalid result with input droplist with 3 choice values,&amp;nbsp;&lt;BR /&gt;name/value: ALL/*,&amp;nbsp; TRUE/TRUE, FALSE/FALSE,&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when I used the following search to verify&amp;nbsp;&amp;nbsp;&amp;nbsp;where ValidatorResult =&amp;nbsp; &amp;nbsp; &amp;nbsp;，&amp;nbsp; then i noticed,&amp;nbsp; for TRUE, or FLASE, I have to use&amp;nbsp;| where ValidatorResult = "TRUE",&amp;nbsp; ValidatorResult = "FALSE",&amp;nbsp; &amp;nbsp; it works,&amp;nbsp; but quote must be used, ,&amp;nbsp; but for&amp;nbsp; *,&amp;nbsp; either no quote or with quote, it doesn't work.&lt;/P&gt;&lt;P&gt;more important, the value sent by Token,&amp;nbsp; is just&amp;nbsp; TRUE, FALSE, or&amp;nbsp; *,&amp;nbsp; &amp;nbsp;all no quote.&lt;/P&gt;&lt;P&gt;so, how to have this droplist&amp;nbsp; &amp;nbsp;ALL(*),&amp;nbsp; TRUE, FALSE work with the validator result as a filter?&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex mode=sed field=TargeValidator "s/(?&amp;lt;var&amp;gt;\w+)\s*(?&amp;lt;comparator&amp;gt;[&amp;lt;&amp;gt;=]+)\s*(?&amp;lt;num&amp;gt;0|[1-9]\d*)//g"&lt;/P&gt;&lt;P&gt;| eval ValidatorResult&amp;nbsp; = if(match(TargeValidator,"[\d\w]"),"FALSE","TRUE")&lt;/P&gt;&lt;P&gt;| where ValidatorResult = "*"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sat, 15 Jan 2022 20:01:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581220#M202490</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-15T20:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581221#M202491</link>
      <description>&lt;P&gt;I have to admit I am a little confused about how to use boolean and string type here for&amp;nbsp; TRUE or FALSE correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 20:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581221#M202491</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-15T20:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581237#M202496</link>
      <description>&lt;P&gt;I am not sure I understand what you are trying to do here but if you have a dropdown would this work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where ValidatorResult=$dropdowntoken$&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 16 Jan 2022 09:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581237#M202496</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-16T09:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581254#M202501</link>
      <description>&lt;P&gt;Hi, ITWhisperer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| where ValidatorResult=$dropdowntoken$&amp;nbsp; is shown as&amp;nbsp;| where ValidatorResult= TRUE&amp;nbsp; in search (when I open a search from dashboard)， when I select TRUE from droplist.&lt;/P&gt;&lt;P&gt;but there is&amp;nbsp; no any event return.&lt;/P&gt;&lt;P&gt;if in search I changed&amp;nbsp;| where ValidatorResult= TRUE&amp;nbsp; to&amp;nbsp;| where ValidatorResult= "TRUE", then there is return.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or let me put it this way,&amp;nbsp; the value sent from token are&amp;nbsp; TRUE, or FALSE，or&amp;nbsp; *，&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in real search，only when I quote TRUE， FALSE， there are&amp;nbsp; event return.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for&amp;nbsp; all/*,&amp;nbsp; &amp;nbsp;both&amp;nbsp; *&amp;nbsp; and&amp;nbsp; "*",&amp;nbsp; &amp;nbsp;all no&amp;nbsp; event return.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 16:33:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581254#M202501</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-16T16:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581255#M202502</link>
      <description>&lt;P&gt;Try with |s to wrap the token value in quotes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where ValidatorResult=$dropdowntoken|s$&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 16 Jan 2022 16:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581255#M202502</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-16T16:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581259#M202503</link>
      <description>&lt;P&gt;ITWhisperer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's perfect for TRUE or FALSE,&amp;nbsp; but when I select ALL/* (value) from droplist,&amp;nbsp; &amp;nbsp;there is still no return.&lt;/P&gt;&lt;P&gt;like I said before I did try both&amp;nbsp;&amp;nbsp;| where ValidatorResult=* ,&amp;nbsp; and&amp;nbsp;&amp;nbsp;where ValidatorResult="*",&amp;nbsp; there is all no return.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I expected for selecting ALL/*,&amp;nbsp; it should return all events for both TRUE and FALSE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 17:57:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581259#M202503</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-16T17:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581260#M202504</link>
      <description>&lt;P&gt;The validator either gives true or false - this is a binary option, there is no third option. This solves your original question. What are you expecting an ALL option to do?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 18:37:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581260#M202504</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-16T18:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581264#M202507</link>
      <description>&lt;P&gt;Right, the result is either TRUE or FALSE,&amp;nbsp; but&amp;nbsp; what I want to display in dashboard is not only either TRUE or FALSE, also could be both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 20:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581264#M202507</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-16T20:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581265#M202508</link>
      <description>&lt;LI-CODE lang="markup"&gt;| where match(ValidatorResult,$dropdowntoken|s$)&lt;/LI-CODE&gt;&lt;P&gt;Set the value for ALL to . (dot)&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 20:51:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581265#M202508</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-16T20:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop Regex to find invalid pattern in a skill level expression string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581269#M202510</link>
      <description>&lt;P&gt;thank you very much , it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 22:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-Regex-to-find-invalid-pattern-in-a-skill-level/m-p/581269#M202510</guid>
      <dc:creator>wangkevin1029</dc:creator>
      <dc:date>2022-01-16T22:51:18Z</dc:date>
    </item>
  </channel>
</rss>

