Splunk Search

How to disable serverclass aids

trs01
New Member

In the serverclass spec link:serverclass.spec , Is there a way to disable these "helpful" regex aids? I'm already pretty good at regex and these "aids" are breaking valid pcre regexes.

 * These patterns are PCRE regular expressions, with the following aids for
   easier entry:
     * You can specify simply '.' to mean '\.'
     * You can specify simply '*' to mean '.*'
 * Matches are always case-insensitive; you do not need to specify the '(?i)' prefix.

Example:

hosts
cu-idp-p-idp04.domain.com
cu-idp31-d-tst03.domain.com

This regex
whitelist.0 = cu-idp\d*-[pcrzd]-(idp|tst)\d+.*

had to be changed to
whitelist.0 = cu-idp\d{0,}-[pcrzd]-(idp|tst)\d+*

even though the first one is valid PCRE.

https://regex101.com/r/E07teW/1

Also, little help with the serverclass link mods? It looks like I don't have enough rep to create a link

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...