Splunk Search

Rex command help

mpk_24
Explorer

Hey @Splunkers,

Looking for valuable insights for this use case.

 

I wanted to extract the numbers at the end of the log (highlighted in bold). Pls help.

Sample log:

74.133.120.000 - LASTHOP:142.136.168.1 - [19/May/2025:23:30:12 +0000] "GET /content/*/residential.existingCustomerProfileLoader.json HTTP/1.1" 200 143 "/cp/activate-apps?cmp=dotcom_sms_selectapps_111324" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Mobile Safari/537.36" 384622

Labels (1)
0 Karma
1 Solution

liangliang
Explorer

you can try this   (?P<number>\d+)$  
the $ will match the end of this line

View solution in original post

mpk_24
Explorer

@liangliang thank you so much for your respond. This works. Appreciate very much.  

0 Karma

liangliang
Explorer

you can try this   (?P<number>\d+)$  
the $ will match the end of this line

Get Updates on the Splunk Community!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...