Splunk Search

rex

Deku2345
Observer

How to split a text like ""Liam John" "Grayson Roy" "Olivia"" into names filed using eval and text.

names:

Liam John
Grayson Roy
Olivia

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Deku2345,

you can use the rex command, something like this:

| rex "\"(?<last_name>[^ \"]+)\s|\"(?<first_name>[^ \"]+)"

that you can test at https://regex101.com/r/LYEhns/1

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...