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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...