Splunk Search

What is the regular expression to extract the numbers in my sample?

JoshuaJohn
Contributor

I am trying to get the 432233 extracted into a field called memory

memorythread = "432233 KB";

tried ?(/d)

0 Karma
1 Solution

masonmorales
Influencer

| rex "memorythread = \"(?<memory>\d+)"

View solution in original post

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Try this.. It will create a field called memorythread

... | rex memorythread\s=\s"(?<memorythread>\d+)

0 Karma

masonmorales
Influencer

| rex "memorythread = \"(?<memory>\d+)"

0 Karma
Get Updates on the Splunk Community!

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, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...