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!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...