Splunk Search

Regex help

SS1
Path Finder

Hi,

Can someone help with the regex for below log entry, i need regex to extract the below fields in red. Thanks for your help

INFO 1 --- [nio-8080-exec-2] XXXXXXXXXXX.SLALogging : Response --> {
"TestDetails" : [ {
"TestIdentifiers" : {
"TestIdentifier" : "xxxx",
"TestBusiness" : 1
},
"borrower" : {
"lastName" : "XXXXXX",
"firstName" : "XXXXXX",
"middleName" : "XX"
},
"propertyAddress" : {
"street1" : "XXXXXXXXX",
"city" : "XXXXXX",
"state" : "XX",
"zip" : "XXXXXX",
"country" : "XX"
},
"TestLoanNumber" : "XXXXXXXXXX"
"TestIdentifiers" : {
"TestIdentifier" : "xxxx",
"TestBusiness" : 1

Labels (5)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "(?ms)\"borrower\"\s?:\s?\{(?<borrower>[^\}]+)\}.*\"propertyAddress\"\s?:\s?\{(?<propertyAddress>[^\}]+)\}"

View solution in original post

0 Karma

SS1
Path Finder

Thanks, this worked perfectly

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "(?ms)\"borrower\"\s?:\s?\{(?<borrower>[^\}]+)\}.*\"propertyAddress\"\s?:\s?\{(?<propertyAddress>[^\}]+)\}"
0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...