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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...