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!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...