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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

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