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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...