Splunk Search

Using regex to filter by file directory

nwalker15
Engager

I have a field in splunk named commandline.  I want to filter this field just by values containing "C:\"

This appears sometimes at the beginning of the filed value and other times in the middle.  Can someone help me with a regex statement or other search filter to narrow my results this way?

Labels (1)
0 Karma
1 Solution

diogofgm
SplunkTrust
SplunkTrust

Use wildcards

commandline=“*C:\*”

------------
Hope I was able to help you. If so, some karma would be appreciated.

View solution in original post

Vardhan
Contributor

Hi @nwalker15 ,

 provide sample logs and highlight the keyword which you want to extract.

0 Karma

diogofgm
SplunkTrust
SplunkTrust

Use wildcards

commandline=“*C:\*”

------------
Hope I was able to help you. If so, some karma would be appreciated.
Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Enhance Security Operations with Automated Threat Analysis in the Splunk EcosystemAre you leveraging ...

Splunk Developers: Go Beyond the Dashboard with These .Conf25 Sessions

  Whether you’re building custom apps, diving into SPL2, or integrating AI and machine learning into your ...

Index This | How do you write 23 only using the number 2?

July 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...