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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...