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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...