I've an URL like
https://officedomain.com/CDs/ProductMarketingName/Product/Version/MartkingName_Product_Version.exe
and wrote the following query in Splunk search
index=<Server> sourcetype=<type>
| rex field=URL_Field "http(s)?://[^/]+/(?<EXE_NAME>[^/]+)
But it returns me "CDs" instead of "MartkingName_Product_Version.exe"
What am I doing wrong?
there are more than one path before you get to the EXE_NAME, but your expression only says to look for one.
change:
to:
or:
So that it matches as many paths as it needs to, then the last step being your EXE_NAME:
Or you could use: