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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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