Splunk Search

How to filter events with regex?

pjanssen007
Explorer

I'm trying to filter out events like the ones below using the regex expression

regex _raw!="^[A-Za-z0-9]{4}:.*$"

 

but its not working.  Can someone help me with this?

 

Events

0000: 00 025e 28:0a000c5f call 0a000c5f

0000: 04 025d 14 ldnull

007a: 00 021d de:2a leave.s :0000=>01 0249 11:07 ldloc.s 07

Labels (1)
0 Karma
1 Solution

pjanssen007
Explorer

When I included the | the regex expression worked

| regex _raw!="^[A-Za-z0-9]{4}:.*$"

What function does | perform?

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @pjanssen007,

could you better describe what you mean with " its not working"

Anyway, please try this:

| regex _raw!="[A-Za-z0-9]{4}.*$"

 Ciao.

Giuseppe

0 Karma

pjanssen007
Explorer

When I included the | the regex expression worked

| regex _raw!="^[A-Za-z0-9]{4}:.*$"

What function does | perform?

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @pjanssen007,

regex is a command stats must be located after a pipe.

Does it runs?

Ciao.

Giuseppe

0 Karma

pjanssen007
Explorer

Yes, it works correctly now.  Thanks for your help.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @pjanssen007,

good for you, see next time!

Please accept one answer for the other people of Community

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma

pjanssen007
Explorer

By not working I mean I don't get any results.

0 Karma
Get Updates on the Splunk Community!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

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

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...