Splunk Search

How to Extract multiple 10-digit numbers from field2

Gzee
Engager

Hi, Novice splunker here. My search only extracts 1st 10-digit number and my data contains atleast 4 or more  10-digit numbers. Need help on how to make a list of numbers from following example text.

 example data in field2:

1111111111,Standard,R9801,
2222222222,Standard,S9801,
3333333333,Standard,T9801,
4444444444,Standard,U9801,
5555555555,Standard,V9801,

For order and enquiries contact 111xxxxxx and mention the 15 digit ID "ACOOLXXXXXX"

 



|rex field=Data "(?<Numbers>\d{10,})"
|table Numbers
Output of above is only 1st number in the field Numbers>> 1111111111
Thanks.

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
|rex field=Data max_match=0 "(?<Numbers>\d{10,})"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
|rex field=Data max_match=0 "(?<Numbers>\d{10,})"
Get Updates on the Splunk Community!

Happy CX Day to our Community Superheroes!

Happy 10th Birthday CX Day!What is CX Day? It’s a global celebration recognizing innovation and success in the ...

Check out This Month’s Brand new Splunk Lantern Articles

Splunk Lantern is a customer success center providing advice from Splunk experts on valuable data insights, ...

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...