Splunk Search

Regex to extract between these two characters, : and "

jacqu3sy
Path Finder

Hi,

Can anyone help with a regex to extract the string seen after a : and up to a final ".

so for example.....

"event : thisstringneedstobeextracted"

note the space either side of the :

Thanks.

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try \s:\s(?<myfield>[^\"]+)\". If you're doing the extraction at search time, you'll need extra escape characters \s:\s(?<myfield>[^\\\"]+)\\\".

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...