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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...