Splunk Enterprise

rex field

Yim
Loves-to-Learn Lots

Hi everyone, 

I am using rex field to extract content that containst the following word: full

 

| rex field=msg_old "(?<msg_keyword>full).*"

 

However, what I actually need is to extract content with the word full alone, not words that contain full in between, just the word full itself. 

Can you please advise if the sentence needs to be different? Thanks

 

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

a nice place to test regex is regex101.com.

https://regex101.com/r/5maP5V/1 here is one example how this can achieve.

| rex field=msg_old "\b(?<msg_keyword>full)\b"

If you want select only events which have word full in field msg_old then you should try

| regex msg_old = "\bfull\b"

 r. Ismo

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what you are trying to do. You use "full" in your pattern, but you mention "FULL" in your description. Do you need what is extracted to be changed to uppercase? What do you mean by "not between"? Do you just want the word "full" if it exists in the msg_old field? Please clarify with sample (anonymised) events and a clear description of what you want to extract from where, and under what circumstances. Please also include a representation of what your expected output would look like.

0 Karma

Yim
Loves-to-Learn Lots

Hi ITWhisperer,

For example, with that instruction I am extracting data from msg_old field with the word full in between like: she works successfully for us, but what I need is just data that contain the word word "full" itself. 

For instance: The house is full. 

Hope this can clarify. Thanks.

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Not really. Please provide a sample anonymised event in raw format, in a code block (using the </> button above) to preserve the format of the event. Please indicate which part of the event you want extracted.

0 Karma

Bhumi
Path Finder

Hi @Yim 

Are you trying to extract it from the field or raw data ? 

Please send me the sample data and elaborate it what you are trying to achieve as an output. 

0 Karma

Yim
Loves-to-Learn Lots

 

Hi Bhumi,

For example, with that instruction I am extracting data from msg_old field with the word full in between like: she works successfully for us, but what I need is just data that contain the word word "full" itself. 

For instance: The house is full. 

Hope this can clarify. Thanks.

 

0 Karma
Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk &#43; Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...