Splunk Search

field extraction with Regular expression giving inconsistent results

ayadav38
Engager

Hey there,

I  created a field extraction from UI,using regular expression method,where regular expression got created automatically,but when is use that extracted field in my search,most values for that field are null where in they are available in raw data

here`s my raw data and i need to extract the value of medicareId(which is combination of letters and numbers).please advise,any help appreciated.

Message Started processing in Async: MtmCaseActivity(clinicalProgramName=sample, identificationDate=sample, caseID=sample, branding=sample, cycleYear=2021, status=Closed, closingDate=sample, workedBy=sample, reworkReason=, fulfillmentId=, identifiers=MtmCaseIdentifierDto(externalMemberId=null, carrierId=sample, accountId=sample, groupId=sample, memberId=sample, medicareId=sample, contractId=sample, pbp=sample), memberDemographics=MtmMemberDemographicsDto(memberFirstName=sample, memberLastName=sample, memberDOB=sample, memberAddress1=sample, memberAddress2=, memberCity=sample, memberState=sample, memberZip=sample, patientGender=F), eligibility=MtmEligibilityDto(effectiveDate=sample, termDate=sample), consultationDetails=null)

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @ayadav38 ,

I usually manually modify the regexes extracted with the Field Extractor!

so, please, try this:

| rex "medicareId\=(?<medicareId>[^,]+)"

That you can test at https://regex101.com/r/9Xt6Tx/1

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @ayadav38 ,

I usually manually modify the regexes extracted with the Field Extractor!

so, please, try this:

| rex "medicareId\=(?<medicareId>[^,]+)"

That you can test at https://regex101.com/r/9Xt6Tx/1

Ciao.

Giuseppe

Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...