Security

I need to extract field call "subject" from data field "FW: [ DOC 45 ] DTP: DEMO XXX CCC | 20147"

karu0711
Communicator

Data field  "FW: [ DOC 45 ] DTP: DEMO XXX CCC | 20147" from this I need to extract  "DEMO XXX CCC"

output subject field "DEMO XXX CCC"

0 Karma

Gr0und_Z3r0
Contributor

@karu0711 

| makeresults
| eval a="FW: [ DOC 45 ] DTP: DEMO XXX CCC | 20147"
| eval subject=mvindex(split(mvindex(split(a,":"),2),"|"),0)

 

Gr0und_Z3r0_0-1679998854603.png

 

 

ITWhisperer
SplunkTrust
SplunkTrust

Based on other answers you have been given to similar questions, what have you tried so far?

karu0711
Communicator

I need to create separate so I can count and create dropdown to search.
  DEMO XXX CCC

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

OK So, from what you have been shown with rex already, how do you think this could be applied to your current request. Note that regex.com is a good site for creating and testing regex extractions (although they can need a bit of tweaking to use in Splunk, especially if back-slashes are involved).

Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...