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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

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

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...