Splunk Search

Rex field to extract dot net module

totaro
Explorer

Hi i currently have the following line in my search that search for system.net.webclient:

|rex max_match=0 "(?<module>(system.net.webclient))"

May i know how do i amend this to search for any syntax that match system.xxx.xxx so it work for all the module?

Tags (2)
0 Karma
1 Solution

vnravikumar
Champion

Hi

check this

| makeresults 
| eval test= "system.com.testclient" 
| rex field=test max_match=0 "(?<module>(system\.\w+\.\w+))"

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try |rex max_match=0 "(?<module>system\.[^\.]+\.\S+)".

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

totaro
Explorer

This actually works better if the data was more organize; sadly my data was not and it capture too many noise

0 Karma

vnravikumar
Champion

Hi

check this

| makeresults 
| eval test= "system.com.testclient" 
| rex field=test max_match=0 "(?<module>(system\.\w+\.\w+))"
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...