Splunk Search

How to create the regex to match the pattern in my data for proper event breaking?

RashmiGowda
Explorer

Hello All,

Can any one please help me out to create the regular expression / regex for the below pattern -

-- TIME: [2014-12-12 11:53:50,390] --

Need to break the event based on the above pattern. Anyone can help me on this please..!!

Thanks in advance.

Tags (2)
0 Karma

pradeepkumarg
Influencer

Try this


\W{2}\sTIME\:\s\W\d{4}\-\d{2}-\d{2}\s\d+\:\d+\:\d+,\d{3}\W\s\W+

RashmiGowda
Explorer

Thanks pradeep.. could you please explain the regex pattern which u suggested. Please..!!

0 Karma

ppablo
Retired

Hi @RashmiGowda

If @gpradeepkumarreddy's answer solved your question, don't forget to resolve the post by clicking "Accept" directly below his answer and upvote it by clicking the up arrow to the left of the answer. Thanks!

Patrick

0 Karma

satishsdange
Builder

Please refer to https://regex101.com/. Copy & paste above regex string & data.

pradeepkumarg
Influencer

Wha did you try so far?

0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...