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!

Introducing Ingest Actions: Filter, Mask, Route, Repeat

WATCH NOW Ingest Actions (IA) is the best new way to easily filter, mask and route your data in Splunk® ...

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...