Splunk Search

How to search for fields that contain numbers

mlevsh
Builder

Hi,
I need to run a search the would select only those events where field Id contains numbers
For example: it can be "bs332cs5-bs3 ", "cd3g54cdd" versus "planner" or "sync"

Tags (1)
0 Karma

woodcock
Esteemed Legend

Like this:

your base search | regex Id="\d"

somesoni2
Revered Legend

Try like this

your base search | regex Id=".*\d+.*"

Alternatively

your base search | where match(Id,"\d")

mlevsh
Builder

@somesoni2 , thank you!

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...