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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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