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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...