Dashboards & Visualizations

WIll you help me with my string extraction?

zacksoft
Contributor
2018-11-26 05:27:57,330 [http-nio-228.0.0.1-80-exec-653] [INFO ] (o.a.e.UploadServiceImpl:360) - Deploy to 'raven-snapshots:com/mayhem/xmen/edm-aggregator/1.0.0-SNAPSHOT/edm-aggregator-1.0.0-SNAPSHOT.rom' Content-Length: 710

I would like to be able to extract the strings present between "/" AND "' Content-" .

In the above example the extracted string should be edm-aggregator-1.0.0-SNAPSHOT.rom

Thank you.

Tags (1)
0 Karma
1 Solution

493669
Super Champion

try this:-

|rex ".*\/(?<String>[^\']+)'\sContent"

https://regex101.com/r/wFJxBs/1

View solution in original post

0 Karma

493669
Super Champion

try this:-

|rex ".*\/(?<String>[^\']+)'\sContent"

https://regex101.com/r/wFJxBs/1

0 Karma

zacksoft
Contributor

Could you also help to get the string , starting from "Deploy to" till ":".
In this case the extract string should be raven-snapshots

0 Karma

493669
Super Champion

try this:

|rex "Deploy\sto\s'(?<string2>[^:]+)"
0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...