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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...