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
Legend

@salmanbpc ,

Try

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

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...