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 Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...