Splunk Search

how to extract only numeric values from field into table ? it fetching the non field values too from.

salmanbpc
New Member

for example: dport=86 pattern: 0 tcp && dst port 86 && dst 345
here dport is field and pattern is non field value.

in the report command im getting "86 pattern: 0 tcp" i just need the port numeric value.

Tags (1)
0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@salmanbpc ,

Try

"your search"|rex field=dport "dport=(?<port_number>\d+)"
Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...