Splunk Search

Help to extract other than numbers

paullt12345
Explorer

Hi

I need help to extract other than numbers from a string

Ex:
test34565
test.xyw2345
test-abc53243

Output

test
test.xyw
test-abc

Tags (2)
0 Karma
1 Solution

vnravikumar
Champion

Hi

Try like

| makeresults 
| eval msg="sample-abc53243" 
| rex field=msg "(?P<output>[^\d]+)"

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi paullt12345,
try something like this

 | makeresults 
 | eval msg="sample-abc53243" 
 | rex field=msg "(?<my_field>\D+)"

You can test it at https://regex101.com/r/r8jYBl/1

Bye.
Giuseppe

0 Karma

vnravikumar
Champion

Hi

Try like

| makeresults 
| eval msg="sample-abc53243" 
| rex field=msg "(?P<output>[^\d]+)"
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...