Splunk Search

Need help with rex command

locose
Path Finder

Hello I'm trying to run a rex command to extract "is set to expire"

Relying party trust 'ButterCup Games - Test'
xxxxx: Signing certificate with thumbprint '1111111111111111111111' is set to expire on 2/13/2020 6:59:59 PM.

Tags (1)
0 Karma

vnravikumar
Champion

Hi

If you want to extract date/time, please try the following

| makeresults 
| eval temp="xxxxx: Signing certificate with thumbprint '1111111111111111111111' is set to expire on 2/13/2020 6:59:59 PM." 
| rex field=temp "set to expire on\s(?P<expireon>\d{1,2}\/\d{1,2}\/\d{4}\s\d{1,2}\:\d{1,2}\:\d{1,2}\s(AM|PM))"
0 Karma

to4kawa
Ultra Champion
|rex "(?<youWant>\d{5,})"
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, ...