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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...