Splunk Enterprise

What rex command extracts data from csv?

Ashwini008
Builder

Hi,

I am trying to extract data from one of the column in lookup file. Regex expression is working in rex tool. I want to use that regex expression in rex command in splunk .

Rexgex expression  ^.*(?= \[)

Example: Want to extract the highlighted bold data. This data is present in csv lookup file.

  1. TAX PLATFORM [12998]
  2. CPOI [0639]

 

| inputlookup Meta.csv 
| rex field=Application "^.*(?<name>= \[)"

 


 

Labels (1)
Tags (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Sorry, I left the '=' in unnecessarily - try this

| inputlookup Meta.csv 
| rex field=Application "^(?<name>.*) \["

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| inputlookup Meta.csv 
| rex field=Application "^(?<name>.*)= \["
0 Karma

Ashwini008
Builder

@ITWhisperer It isn't working

Ashwini008_0-1679654470813.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Sorry, I left the '=' in unnecessarily - try this

| inputlookup Meta.csv 
| rex field=Application "^(?<name>.*) \["
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...