Splunk Search

Extract numeric values with in a field

iamsplunker
Communicator

We have a field called number and the field number has both alpha and numeric values like "number=AVAILABLE=25 USD;" and the field number also has multi values like number=" CREDIT_PAYMENT=200.22 USD; DEBIT_PAYMENT=500.10 USD;" also it has null values like number=null

I want to extract all dollar amounts like 25 and 200.22 and 500.10 and create a new field. How can I achieve this?

Please help

 

Labels (1)
0 Karma

renjith_nair
Legend

@iamsplunker,

Try and test against your data

|rex field=number max_match=0 "=(?<digits>\d+.?\d+|null)"
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...