Splunk Search

How to use the field in search query EXTRACTED using REX command

rangineniarunku
Explorer

I have a field named "content" with multiple values to it as follows
content=value.deva
content=value.devb
" =value.devc ......
I have written a rex expression in my search query .........| rex field=Name ".(?.*)" to extract the Environment from the field content . Now I want to get the values in my result only for Environment=deva, how can I use the field Environment in my query?
I tried this way but it did not work ".........| rex field=content ".(?.)" | Environment=deva "

Can someone help me with this?

Tags (2)
0 Karma
1 Solution

DalJeanis
SplunkTrust
SplunkTrust

You are looking for the | where command.

| where Environment="myvalue" 

View solution in original post

DalJeanis
SplunkTrust
SplunkTrust

You are looking for the | where command.

| where Environment="myvalue" 

rangineniarunku
Explorer

It worked!!!

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...