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!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...