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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...