Splunk Search

How to split by delimiter?

ranjithan
Path Finder

Hi Splunkers,

Reaching out for help

This is a sample _raw event: 

12.23.454, abcd, 12.34.45,abc@gmail.com,"[EXTERNAL] 300,000+ software product demos",SEND,OK

i want to split  this by using the split command ,  using  comma as a delimiter  and assign to different fields.

However,  "EXTERNAL] 300,000+ software product demos"  is a single field   and i dont want it to be split into multiple fields

 In few  other events, comma is not present . For instance:

12.23.454, abcd, 12.34.45,abc@gmail.com,  "[EXTERNAL] 300000+ software product demos"  ,SEND,OK

 

How do i ensure that these values are assigned to the field in the events. 

"EXTERNAL] 300,000+ software product demos"

"[EXTERNAL] 300000+ software product demos"

 

Thanks for your help 

 

 

 

 

Labels (2)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You could try something like this

| rex max_match=0 "(?<field>([^\",]+|\"[^\"]+\")),?"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

You could try something like this

| rex max_match=0 "(?<field>([^\",]+|\"[^\"]+\")),?"

ranjithan
Path Finder

Thank You , this helps! 

0 Karma
Get Updates on the Splunk Community!

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...