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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...