- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ranjithan
Path Finder
07-25-2022
04:28 AM
Hi ,
Need some help to extract regular expressions.
I have a set of unstructured logs . Part of the log is as shown below:
"RequestUTCDateTime":"2022-07-25T11:19:29.0106873Z"}
How would one extract 2022-07-25T11:19:29.0106873Z and assign it to field RequestUTCDateTime, .
This should be done whenever "RequestUTCDateTime" is encountered in the raw log.
Please help me.
Thank You,
Ranjitha N
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
07-25-2022
06:03 AM
You can extract the field at search-time using the rex command.
| rex "RequestUTCDateTime\\\":\\\"(?<RequestUTCDateTime>[^\\\"]+)"
Or it can be extracted automatically using an EXTRACT setting in props.conf:
EXTRACT-RequestUTCDateTime = RequestUTCDateTime":"(?<RequestUTCDateTime>[^"]+)
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
07-25-2022
06:03 AM
You can extract the field at search-time using the rex command.
| rex "RequestUTCDateTime\\\":\\\"(?<RequestUTCDateTime>[^\\\"]+)"
Or it can be extracted automatically using an EXTRACT setting in props.conf:
EXTRACT-RequestUTCDateTime = RequestUTCDateTime":"(?<RequestUTCDateTime>[^"]+)
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ranjithan
Path Finder
07-25-2022
06:30 AM
Thank You so much for the help!
