Splunk Search

How to break the events using regex?

kiran331
Builder

Hi I have the text file with below sample data I have to break the events using
"-------------------------" as event break

abc

text file: 123
name: 235
list: 6363


dfdf

text file: df
name: ggg
list: fdgdfg


abc

text file: 123
name: 235
list: 6363


cds

text file: 1fd3
name: ff35
list: 6sd

Tags (2)
0 Karma

somesoni2
Revered Legend

Try this

props.conf on indexer/heavy forwarder

[yoursourcetype]
SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]+)(?=\-+)
DATETIME_CONFIG=CURRENT
0 Karma

kiran331
Builder

Hi Somesoni, I Have "-------------------------" in the text

after each group details. I have to split the events after

0 Karma

somesoni2
Revered Legend

I believe the above configuration should do that. Did you get a chance to test it (or share what failed if you've)?

0 Karma

senthamilselvan
Engager

Hi Somesoni,
I have the same problem in splitting the events, I tried your above answer but it is not working.

Here is my requirement, I want to split the log in to multiple events based on the delimiter "========" . So that i will get 3 events in splunk
abc
text file: 123
name: 235

list: 6363

dfdf
text file: df
name: ggg

list: fdgdfg

cds
text file: 1fd3
name: ff35

list: 6sd

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...