Splunk Enterprise

regex everything after last colon in each line

indeed_2000
Motivator

I have log file like this,want regex everything after last colon in each line

input:

2020-06-28 15:03:32,710 ERROR In--111111 [Processor] FATAL: exception in process: javax.RollbackException: ARJUNA016053: Could not commit.
 
2020-06-28 14:24:41,322 ERROR In--111111[Processor] FATAL: exception in process: [GG_010] Failed >> 0060:  required to perform this operation (extended persistence context).
 
2020-06-28 15:03:32,710 ERROR In--111111 [Processor] FATAL: exception in process: javax.RollbackException: ARJUNA016053:Could not update.
 
output:
Could not commit
required to perform this operation (extended persistence context)
Could not update
 
Thanks
Labels (1)
Tags (2)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

based on your example.

| rex field=_raw "\d{4,}:(?<message>[^:]+)"

r. Ismo

0 Karma

indeed_2000
Motivator

It’s different sometimes locate in other position 

e.g not work on this, that’s why i said “latest” colon position and number of colon may be different

input:

2020-06-28 12:08:21,777 ERROR in-app-9999999 [Service] authorize: org.closed.PropertyAccessException: Null value was assigned to a property [class co.domain.entity] of primitive type setter of domain.entity.

 

Output:

Null value was assigned to a property [class co.domain.entity] of primitive type setter of domain.entity.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Then you could try this:
| rex field=_raw ".*:(?<message>[^:]+)"
0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...