Splunk Search

Field extraction optimisation

FunPolice
Path Finder

I want to extract the recipient and sender domains from e-mail addresses that appear in my logs. I can extract them from _raw:

EXTRACT-ToDomain = (?i)to=<[^@]*@(?<ToDomain>[^>]*)
EXTRACT-FromDomain = (?i)From=<[^@]*@(?<FromDomain>[^>]*)

or from existing fields:

EXTRACT-ToDomain = @(?P<ToDomain>[^>]*) in to
EXTRACT-FromDomain = @(?P<FromDomain>[^>]*) in From

Is one method more efficient than the other?

0 Karma
1 Solution

Ayn
Legend

Strictly speaking the second option would be a bit more efficient, but in reality I highly doubt you would be able to notice any difference.

View solution in original post

Ayn
Legend

Strictly speaking the second option would be a bit more efficient, but in reality I highly doubt you would be able to notice any difference.

Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

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 ...