Splunk Search

extract with quoted values

Path Finder

In our logs we have keyvalue pairs that looks like this

key2='value value val'
keyxx='lksajdf lajsdf'

just the default |extract does a good job but all the values still have the single quotes around them. One thing to remember is that we dont know how many keys and what keys there will be, so i cant hard code them, they are volatile.

i would like to apply this regexp to all the values of my extractions ^'(.*)'$

can i configure this somewhere in my transforms.conf ?

Tags (1)
0 Karma


Something like this should work:


REPORT-ex = myreport


REGEX = ([^=]+)='([^']+)'\s
FORMAT = $1::$2

This should automatically extract all values and populate keyX fields with them, no matter how many there are.

0 Karma

Path Finder

doesn't work for me ... just using |extract works but all values are still with the single quotes around them .

0 Karma
Get Updates on the Splunk Community!

Using Machine Learning for Hunting Security Threats

REGISTER NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more ...

Security Highlights | November 2022 Newsletter

 November 2022 2022 Gartner Magic Quadrant for SIEM: Splunk Named a Leader for the 9th Year in a RowSplunk is ...

Platform Highlights | November 2022 Newsletter

 November 2022 Skill Up on Splunk with our New Builder Tech Talk SeriesCan you build it? Yes you can! *play ...