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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...