Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Regex on input change

$
0
0
In a dashboard, I have a dropdown input where the user can enter an IP address (customs value). I want to validate that the user's input is really an IP address/net and if not change it to 0.0.0.0/0. I have the following XML in the dropdown input:if(match($value|s$,"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"),"OK","KO")if(match($value|s$,"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"),"OK","KO") For example, I add the user custom value "aaaa" to the dropdown. Then, if I print the value of `net_token_exp` it shows: `if(match("aaaa","\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"),"OK","KO")` But maybe the `net_token` value is **OK** (even if it does not match the regex...) or it even not evaluates the condition so it does not change the net_token value. What am I doing wrong?

Viewing all articles
Browse latest Browse all 47296


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>