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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...