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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...