Splunk Search

How to assign a range in REGEX for filtering search results?

Madhan45
Path Finder
welcome to india : 0
welcome to india : 45
welcome to india : 123
welcome to india : 4999
welcome to india : 5000
welcome to india : 5001

Above are my input logs. I want to ignore an integer from 0 to 4999 in the string above. I need to get a result as below for the input. I tried with .*welcome to india : [0-4]?[0-9]?[0-9]?[0-9]?.*, but it didn't work.

welcome to india : 5000
welcome to india : 5001
Tags (4)
0 Karma

sundareshr
Legend

Try this

:\s([5-9]\d+)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

This regex will match integers from 5,000. If you only want 4 digits, change "{3,}" to "{3,4}".

"(welcome to india : [5-9][0-9]{3,})"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...