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!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...