Splunk Search

How to write a regular expression to list out events with a date in the format dd-mm-yyyy?

pavanae
Builder

How do I write the regex to list out the events with dd-mm-yyyy ?

where
dd-days
mm-month
yyyy-year

all are digits.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Perhaps this will get you started.

index=foo | regex "\d\d-\d\d-\d{4}" | ...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

jkat54
SplunkTrust
SplunkTrust

\d\d-\d\d-\d\d\d\d

But I take it you want to then convert this to a timestamp or index this with correct timestamps.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Perhaps this will get you started.

index=foo | regex "\d\d-\d\d-\d{4}" | ...
---
If this reply helps you, Karma would be appreciated.

sundareshr
Legend

Can you share some events?

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...