Splunk Enterprise

Correct REGEX to capture hostname

becksyboy
Communicator

Hi,

I’m having trouble formulating the correct regex to capture a hostname. Im only interested in the following

divvo
divvo1
divvo2

I don’t want to capture:

divvoabcdef
divvo1abcdef
abcdefdvvo
abcdefdvvo1.

Is there a good REGEX to capture this?

Tags (1)
0 Karma
1 Solution

micahkemp
Champion
0 Karma

becksyboy
Communicator

Thanks will give this a try

0 Karma

micahkemp
Champion
^divvo\d*$
0 Karma

micahkemp
Champion

Is the pattern defined by the literal term divvo?

0 Karma

becksyboy
Communicator

Hi, yes it is

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

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