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!

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 ...