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!

Reduce and Transform Your Firewall Data with Splunk Data Management

Managing high-volume firewall data has always been a challenge. Noisy events and verbose traffic logs often ...

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...