<?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: Regex Help for Dashboard Field in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575473#M10217</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/190794"&gt;@johnhuang&lt;/a&gt;&amp;nbsp; - Such a simple yet brilliant solution. I got what I wanted.&amp;nbsp; Thank you so much, Sir.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 15:28:00 GMT</pubDate>
    <dc:creator>zacksoft_wf</dc:creator>
    <dc:date>2021-11-18T15:28:00Z</dc:date>
    <item>
      <title>Regex Help for Dashboard Field</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575074#M10213</link>
      <description>&lt;P&gt;I am changing the dashboard XML to perform an in-line field validation, but I &lt;U&gt;cannot seem to get the regEx right.&lt;/U&gt;&lt;BR /&gt;Here is the sample XML code that I already have for another field. (In this example I am validating if the field entry is numeric or not).&lt;BR /&gt;My &lt;U&gt;regex requirement&lt;/U&gt; is, It should be able to&lt;U&gt; check if the input entered has any space in the beginning or end&lt;/U&gt; or &lt;U&gt;if it has any doublequotes character&lt;/U&gt; in it. The regex should run inside the dashboard source code XML.&lt;BR /&gt;&lt;BR /&gt;=======&lt;BR /&gt;&amp;lt;eval token="validationResult"&amp;gt;if(match(value, &lt;STRONG&gt;"([^a-zA-Z0-9]\s?[^a-zA-Z0-9])\s$"&lt;/STRONG&gt;), "trailing Punctuation or Space. [Remove any padded whitespaces or double quotes frov 'Value'] ", "No padded Punctuation or Space or doublequotes [No Action Required]"&amp;lt;/eval&amp;gt;&lt;BR /&gt;========&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 15:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575074#M10213</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2021-11-16T15:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for Dashboard Field</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575095#M10214</link>
      <description>&lt;P&gt;Assuming "value" is the original token name and "validationResult" becomes the new token, the code below will remove leading and trailing spaces, and remove double quotes.&lt;/P&gt;&lt;P&gt;&amp;lt;eval token="validationResult"&amp;gt;trim(replace($value$, "\"", "")&amp;lt;/eval&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 17:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575095#M10214</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-11-16T17:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for Dashboard Field</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575256#M10215</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/190794"&gt;@johnhuang&lt;/a&gt;&amp;nbsp; -Thanks.&amp;nbsp;&lt;BR /&gt;The way I wanted to implement isn't yielding me result. It is failing.&lt;BR /&gt;I was thinking, is there any way I could condition match and put the same regex logic.&lt;BR /&gt;So I tried it but it didn't help..Could you suggest any simpler implementation , to validate this text field.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;input type="text" token="value"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Value&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;condition match ..&amp;gt;&lt;BR /&gt;&amp;lt;/condition&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 12:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575256#M10215</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2021-11-17T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for Dashboard Field</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575353#M10216</link>
      <description>&lt;P&gt;There's no need to conditional match if your goal is to sanitize the input.&lt;/P&gt;&lt;P&gt;&amp;lt;input type="text" token="value"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Value&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;change&amp;gt;&lt;BR /&gt;&amp;lt;eval token="value"&amp;gt;trim(replace(value, "\"", "")&amp;lt;/eval&amp;gt;&lt;BR /&gt;&amp;lt;/change&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 23:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575353#M10216</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-11-17T23:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for Dashboard Field</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575473#M10217</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/190794"&gt;@johnhuang&lt;/a&gt;&amp;nbsp; - Such a simple yet brilliant solution. I got what I wanted.&amp;nbsp; Thank you so much, Sir.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 15:28:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Regex-Help-for-Dashboard-Field/m-p/575473#M10217</guid>
      <dc:creator>zacksoft_wf</dc:creator>
      <dc:date>2021-11-18T15:28:00Z</dc:date>
    </item>
  </channel>
</rss>

