Splunk Search

Finding hostnames

kesvanaidoo
New Member

Hello

I am trying to using regex to search a hostname that begins with WB has a 13 characters, character number 10 is the "I" character, the last three characters are numbers. 001 - 099.

Thanks

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's not clear is the leading "WB" is part of the 13 characters or not.  I'll assume it is not.  It's also not clear if character number 10 is lower-case ell or upper-case eye.  I've assumed the latter.  If either assumption is incorrect then this regex will need to be adjusted.

| regex "WB.{9}I\d{3}"

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

kesvanaidoo
New Member

Hello;

Thanks for responding.

The leading WB is part of the 13 characters. Character number 10 can be upper or lower case

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That changes the regex slightly.

| regex "WB.{7}[iI]\d{3}"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...