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!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...