Splunk Enterprise

How to to capture the below time stamp using "Time_Prefix's Regex."?

super_saiyan
Communicator

I want to capture the below time stamp using "Time_Prefix's Regex."

20220207T111737.014+0800

There is no guarantee that version will always be in that format, so  can someone please help me with a generic Regex ? 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Regex is pattern matching - a generic pattern is neither possible nor useful - for example, ".*" will match to any time stamp you have, but it will also match to everything else which isn't a time stamp. In order to be useful, you will need to identify all the formats you consider to be time stamps in your events, and determine a common pattern or patterns (as few as possible) which describes the time stamp.

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Regex is pattern matching - a generic pattern is neither possible nor useful - for example, ".*" will match to any time stamp you have, but it will also match to everything else which isn't a time stamp. In order to be useful, you will need to identify all the formats you consider to be time stamps in your events, and determine a common pattern or patterns (as few as possible) which describes the time stamp.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...