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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...