Splunk Search

regex returns limit exceeded

drissbek
New Member

Hi

Could you please help me figure out what is wrong with my regex. Splunk is returning a limite exceeds error while my regex is correct according to regex101.

PI, my log looks like below :

XXXX|YYYYY|ZZZZZ|UUUUUU

my regex is:

(?P<XXX>[\,+])\|(?P<YYY>[\,+])\|(?P<ZZZ>[\,+])\|(?P<UUU>[\,+])

Labels (1)
0 Karma

koshyk
Super Champion

seems your regex had small issue

 

| makeresults
| eval msg="XXXX|YYYYY|ZZZZZ|UUUUUU"
| rex field=msg "(?P<XXX>[^\|]+)\|(?P<YYY>[^\|]+)\|(?P<ZZZ>[^\|]+)\|(?P<UUU>[^\|]+)"

 

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Maybe it’s better to use extract if/when you have |-delimiter events?

https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/Extract

r. Ismo

0 Karma
Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...