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!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

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

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...