Splunk Search

Create a filed from lookup data

raghu0463
Explorer

Hi,

I would like to extract a field from lookup data, can i use below search for extraction

| inputlookup dataframedata.csv |regex "\s(?\A\w{1,2}+).gmail.com"

i'm trying to extract only xxxxx as server from the below field

Server_domain
xxxxxxxxxxxx.gmail.com

Tags (1)
0 Karma

raghu0463
Explorer

Examples for server_domain

dcxnaikg102.gmail.com
aedpmna002.gmail.com
xhnaskkjsyh561.gmail.com

0 Karma

mayurr98
Super Champion

what do you want to extract from all these server_domains?

0 Karma

mayurr98
Super Champion

try this :

| inputlookup dataframedata.csv |rex field=Server_domain "(?<server>[^\.]+)\.gmail\.com"

let me know if this helps!

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...