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!

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, ...