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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...