Splunk Search

Need help with a regex

bwindham
Path Finder

I am terrible with regexes.
What regex would I need to extract "pdf" from the following? This was not pulling all events: ^(?:[^.\n]*.){3}(?P\w+)

NCD-FSPW01,4,8646079,DFS-Groups,Passwords, \NCD-FSPW01\DFS-Groups\Legal\Corporate\Entities\Corporations\1. Terminated Corps\RE3, Inc\Board of Directors Meeting Minutes\2016-01-29 Board Meeting Minutes - RE3, Inc..pdf,1,,False

NCD-FSPW01,4,8646079,DFS-IT,Passwords, \NCD-FSPW01\DFS-IT\Legal\Corporate\Entities\Corporations\1. Terminated Corps\RE3, Inc\Board of Directors - Meeting Minutes\2016-01-29 Board Meeting Minutes - RE3, Inc.pdf,1,,False

NCD-FSPW01,4,9378690,DFS-Groups,Passwords, \NCD-FSPW01\DFS-Groups\Tax Dept\4 - REIT Tax Issues & Compliance\2. - Quarterly REIT Tests\2015\Q4\Baby REIT\Sent for Board\Board Approvals\2016-01-29 Board Meeting Minutes - RE33, Inc..pdf,1,,False

NCD-FSPW01,4,9378690,DFS-IT,Passwords, \NCD-FSPW01\DFS-IT\Tax Dept\4 - REIT Tax Issues & Compliance\2 - Quarterly REIT Tests\2015\Q4\Baby REIT\Sent for Board\Board Approvals\2016-01-29 Board Meeting Minutes - RE34, Inc.pdf,1,,False

Thanks!

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

Try this:

^(?:[^,]+,){6,7}.*?(?<filetype>[^\.,]\w+),

View solution in original post

0 Karma

woodcock
Esteemed Legend

Try this:

^(?:[^,]+,){6,7}.*?(?<filetype>[^\.,]\w+),
0 Karma

tiagofbmm
Influencer

How bout:

rex "Board Meeting Minutes - [^\,]*(?<pdf>[^\,]*)"
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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