05 Apr 2026
07:30 PM
- last edited on
08 Apr 2026
08:08 AM
by
MaciejNeumann
I am looking for a way to extract specific substrings from a data record. I need to retrieve all values associated with the key Valuethat are contained inside the value="..." attribute of a data record.
data record(content="Hello value=\"something1\" value=\"something2\" value=\"something2\" hello")
From the above data I want to return this [something1,something2,something2]
I am trying to replicate the same thing that Splunk is doing
| rex field=_raw max_match=9999 "(?s)VALUE=\"(?<term0>.*?)\""
06 Apr 2026 07:27 AM
Hi @TrunksGr ,
You can use parseAll for this.
Documentation reference: https://docs.dynatrace.com/docs/shortlink/string-functions#parseAll
For the example you shared, it can be inferred as this
data record(content = "Hello value=\"something1\" value=\"something2\" value=\"something2\" hello")
| fieldsAdd raw = parseAll(content, "'value=' DQS:val")
| fieldsAdd values = iCollectArray(replaceString(raw[], "\"", ""))
Hope this helps..
Happy Querying 😉
Thanks,
@Maheedhar_T
Featured Posts