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

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...